sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Fumbling Towards Timezone Frenzy

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 2 Posters 347 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      talig
      last edited by

      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

      Avatar: all rights reserved to Bryan Eppihimer

      1 Reply Last reply Reply Quote 0
      • T Offline
        talig
        last edited by

        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

        Avatar: all rights reserved to Bryan Eppihimer

        1 Reply Last reply Reply Quote 0
        • Chris FullmerC Offline
          Chris Fullmer
          last edited by

          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

          Lately you've been tan, suspicious for the winter.
          All my Plugins I've written

          1 Reply Last reply Reply Quote 0
          • T Offline
            talig
            last edited by

            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 πŸ˜‰ )

            Avatar: all rights reserved to Bryan Eppihimer

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement