Time zone

  1. 3 months ago

    Joel_Eisenstat

    Aug 12 User since 2016

    TimeZone.default = "EST"; causes Creo to crash.

  2. 2 months ago

    marco

    Aug 12 Administrator User since 2016

    @Joel_Eisenstat already fixed in our build.
    Your code is wrong because EST cannot be converted to TimeZone and TimeZone.default alone does not make any sense. Can you please better explain (with more code) what you are trying to do?

  3. Joel_Eisenstat

    Aug 12 User since 2016

    I am trying to set the system time zone as it defaults to GMT ( 5 hr offset from EST ) .

  4. Joel_Eisenstat

    Aug 12 User since 2016

    I am pulling out the hour from a Date object to "inject" into another Date object as to query between 7AM and 5PM for a specific date. I want to set the Time Zone as to obtain the correct hour.

  5. Joel_Eisenstat

    Aug 12 User since 2016

    The DatePicker set to America/Toronto but the
    var d = DatePicker1.date; gives 2019-08-12 16:56:02 +0000 where 16 should be 12 as indicated in the Picker object

  6. marco

    Aug 13 Administrator User since 2016

    You can't change the System timezone, only the user has the right to do that.
    What you can do is to change the timezone of a date object in order to correctly show it.
    For example see Convert a String to a Date object using a given format and timezone in https://docs.creolabs.com/classes/Date.html

  7. Joel_Eisenstat

    Aug 13 User since 2016

    Ok now I understand.
    var startd = Date(sdd,"yyyy-MM-dd hh-mm-ss ZZZ","EST")

  8. Joel_Eisenstat

    Aug 13 User since 2016

    Better ; starttime.format("yyyy-MM-dd hh-mm-ss ZZZ","\(TimeZone.system)"

or Sign Up to reply!