Re: gettimeofday() seems to return local time
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com I'm using gettimeofday(), on OS X 10.3.6, to get the time resolution I need (milliseconds). If I'm reading the documentation right, I should be getting time in UTC. However, I'm getting local time. No. Check that you have correctly set the timezone. Try comparing the output of # date and # date -u The system call gettimeofday(2) should behave consistently across all MacOS X versions. Given that the gettimeofday(2) interface dates from 4.2BSD and with the exception of the removal of timezone information has remained unchanged for more than a decade, I find it highly unlikely. = Mike _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Should gettimeofday() return local time? to make sure that the system has an idea of local time that varies from UTC. Will it work the same on all Macs? Will it change with future releases of OS X? This email sent to site_archiver@lists.apple.com
participants (1)
-
Mike Smith