Fumbling Towards Timezone Frenzy
-
Hi everyone,
I'm trying to figure out how to work around Sketchup's Timezone issues.
It seems like the shadow slider shows the correct time with respects to the location of the model, but:
ShadowInfo["ShadowTime"],ShadowInfo["SunRise"],ShadowInfo["SunSet"] - are given as time in the local system. Furthermore, it seems that the conversion to or from one another is wrong (since the time difference between Jerusalem, Israel and Los Angeles, California is 10 hours, and not 3 as it is according to SketchUp 7).What I basically need is the ability to correctly work in the timezone of the model's location. (including writing the information to files, etc.)
Please tell me that someone dealt with this before...
Thanks,- Tali
-
To whomever this may concern later on, the solution was given to me in the Google groups.
Counter intuitively, if one wants the time of the model:Sketchup.active_model.shadow_info["ShadowTime"].gmtime
(or .utc)
and accordingly with "SunRise" and "SunDown".
I repeat, it will notreturn the time converted to UTC/GMT, it will return the time in the model's local time zone (but AS IF it were UTC. Namely, querying for the zone will return "UTC" ).I hope it helps someone else one day
- Tali
-
I'm sure it will help me. I was hoping someone would answer this question. Thanks for remembering to come back and post an answer,
Chris
-
No problem, Chris.
If you have any further questions about this - feel free to message me (or post here and message me so that I'll read it for sure )
Advertisement