Android Question TimeZone Offset Help

walterf25

Expert
Licensed User
Longtime User
Hello all, i need some help with implementing timeoffset. I'm working on an app that will be used in different timezones, the app will communicate with a server and the server will send a response with the current timezone, i'm using Erel's DateUtils library and so far it works very good, i'am using.

B4X:
DateUtils.SetDateAndTime(year, month, day, hour, min, secs, timezone)

this works great with an offset of -5, -7, +5 but what about if the offset is +5:30, how can i use this with this code, since the timezone parameter has to be an integer?

Any suggestions?

Thanks,
Walter
 

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
From the DateUtils documentation:

For 5:30 I'd supply 5.5 as the TimeZone.

- Richard
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…