There is a function in TD7 to determine the TimeZone

Discussion forum about all things Team Developer 7.x
xenox75
Italy
Posts: 8
Joined: 11 Oct 2018, 14:42
Location: Italy

There is a function in TD7 to determine the TimeZone

Post by xenox75 » 30 Oct 2018, 17:01

There is a function in TD7 to determine the TimeZone

Example:
GMT: Tuesday 30 October 2018 16: 40: 10.437
Your time zone: Tuesday 30 October 2018 17: 40: 10.437 GMT + 01: 00

TimeZone = 1540917610437

I need to determine the current timeZone.

thanks

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1274
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: There is a function in TD7 to determine the TimeZone

Post by Dave Rabelink » 30 Oct 2018, 17:49

An example here:

https://samples.tdcommunity.net/index.ph ... rch_mode=f

The button "GetTimeZone" will give the info you need.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1274
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: There is a function in TD7 to determine the TimeZone

Post by Dave Rabelink » 30 Oct 2018, 18:14

The timezone bias can also be calculated using this:

Code: Select all

Set dtDate = SalDateCurrent(  )
Set nBias = ( SalDateToUTCTime( dtDate ) - dtDate ) * 24
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 3 guests