How to know the system time zone?

Previous topic - Next topic

msx

I need to know the time zone of the system, because the PLATFORMINFO$ command only shows the local time. Would there be any way of knowing it?.

msx

@Gernot:

Could be implemented in PLATFORMINFO$?

Slydog

If this is for Windows, you could always get it yourself using an API.
This page outlines how to use the API:
http://www.cpearson.com/excel/TimeZoneAndDaylightTime.aspx

I guess this could be available for other platforms too, like iOS, and those platforms may provide a method to figure it out.

But of course a GLBasic solution would be the best.
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

msx

I think as same we can know the system date, we too could know what time zone is set, regardless of platform. It would be great to add to PLATFORMINFO$ command.

Kitty Hello

OK, next version (V10 release) will have PLATFORMINFO$("UTCTIME") to get universal time.

msx

Thank you very much, that is very important for me.


ampos

Quote from: Kitty Hello on 2011-May-31
OK, next version (V10 release) will have PLATFORMINFO$("UTCTIME") to get universal time.

Can we have PLATFORMINFO$("OWNER'SVISANUMBER")?  :whistle:

Kitty Hello

I think you can get that only on Android :P

msx


msx

Quote from: Ocean on 2011-May-31
Quote from: Kitty Hello on 2011-May-31
OK, next version (V10 release) will have PLATFORMINFO$("UTCTIME") to get universal time.

if a client has it's timezone set, how would you know for sure the local clock is UTC or any other timezone?  I was tripped by this in the past on a couple of occasions....

Knowing the local time and universal time, just have to subtract to find the time difference.

msx

I think the system always works with the universal time and according to user settings, the system time will be modified.