I would like to know if it is possible to obtain the current timezone (offset in hours/minutes) of the machine where Stata is running.
This has been asked before, but without a straightforward solution, see for example:
- https://www.stata.com/statalist/arch.../msg00758.html
- https://www.stata.com/statalist/arch.../msg00413.html
I understand that I can do the following on Windows command line by:
- running tzutil /g, then capturing and parsing the output, and deducing the offset from the reported timezone name.
- running systeminfo | find "Time Zone" , which is way, way, way, waaaay slower, but gives a reliable offset in hours, not just the timezone name.
Clearly, I would prefer a platform-independent standard solution, which would be fast and gives me directly something like "+02:00", possibly with further information on the daylight saving, timezone name, and other attributes...
Are there any additional options for Stata 17 perhaps?
Thank you, Sergiy Radyakin
Related Posts with Current timezone
generating variable with logical operatorsDear Statlisters I have data on ownership of household assets. I want to generate variables where l…
option lc() not allowed \ option lcolor() not allowedDear all, Even though I found similar posts online, I still could not manage to fix this. The code …
Help! Unexpected impact of controlling an omitted variableHi everyone, I'm estimating production function using firm-level panel data (6 years) to obtain fir…
Problem with a dummyHi. I have to create a dummy variable which is zero if a variable "x1"=0 and it is egual to 1 if x2,…
Xtabond postestimation - export results to ExcelDear all, I estimate a dynamic panel model using xtabond command. Next I use xtabond postestimation…
Subscribe to:
Post Comments (Atom)
0 Response to Current timezone
Post a Comment