Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Stata & time zone offset


From   Daniel Gross <grossd@berkeley.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Stata & time zone offset
Date   Tue, 11 Dec 2012 20:32:04 -0800

Hello,

Does anyone know how to get Stata to convert/display times in UTC
rather than local time? In particular, on Windows OS, when I launch
Stata and enter the command: di c(current_time), it reports back the
time in my system time zone (which is currently UTC-08:00). If I
change the Windows time zone (e.g. to UTC), re-launch Stata, and type
the same command, I get back the time in the newly set time zone.

The reason for asking is because I'm trying to compare timestamps
generated by the Stata clock() function (which evidently generate in
local time) to POSIX timestamps in an imported dataset (which are in
UTC). Because the UTC offset varies with time of year due to daylight
savings, this comparison seems to be impossible.

Is that really the case, or does anyone know of a workaround?

Thanks,
Daniel Gross
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index