Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Obtaining time zone offset from within Stata


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   st: Obtaining time zone offset from within Stata
Date   Sun, 26 Jun 2005 01:08:51 +0900

Is there a way for Stata to obtain the time zone offset from the operating 
system (Windows XP Professional) in order to append it to the log file time 
stamp?  I understand that in Windows it's stored in the registry, but is there 
a way from within Stata to query the operating system to obtain this 
information?

We're supposed to begin conforming to ISO 8601.  For the log file time stamp, I 
can -quietly log- and -display- a local macro containing formatted time stamp 
information as a substitute for the Stata default time stamp format.  I can 
obtain everything I need as c-values except the time zone designator.  I'm 
supposing that "hard coding" it (manually appending "+9:00" to the local macro) 
wiil not be considered very amusing.

Also, I need to document the executable born date and official ado-files' 
current update date in the log file header, as well.  I'm using -quietly update 
query- to get this information in return macros, and then -display-ing 
r(inst_exe) and r(inst_ado) with a display format.  Is there a way to obtain 
this information without using -update query-?

Joseph Coveney

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index