Core Date Time Abbreviations

  1. 4 months ago

    Peter S

    Feb 17 Pre-Release Testers, Xojo Pro Huntsville, AL

    Does anybody know if there is a list of the core.date time zone abbreviations?

    I can't seem to find it in the docs.

    PST, MST, CST, and EST are working well, but I'm looking for Atlantic Standard Time and using AST is coming out about 5 hours off.

    There is a list of timezone abbreviations on wikipedia , but it appears that AST is ambigious and could mean both Atlantic Standard Time or Arabia Standard Time.

    So in this case perhaps it's better to use the gmtOffsetInSeconds Constructor . Since Atlantic time is GMT -4, you can use it like this:

    Dim current As Xojo.Core.Date = Xojo.Core.Date.Now
    
    Dim AtlanticZone As New Xojo.Core.TimeZone(-4 * 60 * 60)
    Dim AtlanticDate As New Xojo.Core.Date(current.SecondsFrom1970, AtlanticZone)
  2. Paul L

    Feb 17 Xojo Inc Answer http://docs.xojo.com

    There is a list of timezone abbreviations on wikipedia , but it appears that AST is ambigious and could mean both Atlantic Standard Time or Arabia Standard Time.

    So in this case perhaps it's better to use the gmtOffsetInSeconds Constructor . Since Atlantic time is GMT -4, you can use it like this:

    Dim current As Xojo.Core.Date = Xojo.Core.Date.Now
    
    Dim AtlanticZone As New Xojo.Core.TimeZone(-4 * 60 * 60)
    Dim AtlanticDate As New Xojo.Core.Date(current.SecondsFrom1970, AtlanticZone)
  3. Peter S

    Feb 17 Pre-Release Testers, Xojo Pro Huntsville, AL

    Boom. That did it. Thanks Paul!

or Sign Up to reply!