Android Question get SimpleTimeZone

sn_nn

Member
Licensed User
Longtime User
may be first question is incorrect... Can I read and write the rules of DST for some SimpleTimeZone?
 
Upvote 0

emexes

Expert
Licensed User
the rules of DST for some SimpleTimeZone?

Your life might be even simpler if (!) you can get your users to set their device OS time zone tracking correctly, otherwise you're chasing a constantly-moving target:

https://www.timeanddate.com/news/time/

Updates in 2022
17-Mar-2022 Iran Considers Abolishing DST
16-Mar-2022 The US Senate Approves Permanent DST Bill
14-Mar-2022 Palestine Delays DST Start

Updates in 2021
21-Oct-2021 Palestinian Territories Change End of DST
12-Oct-2021 No DST Start in Fiji in 2021
24-Sep-2021 Jordan Starts DST Early in 2022
20-Sep-2021 Samoa Scraps Daylight Saving Time (DST)
18-Jan-2021 New Time Zone in South Sudan

Updates in 2020
17-Dec-2020 New Time Zone in Russia's Volgograd Region
21-Oct-2020 Palestinian Territories End DST One Week Early
12-Oct-2020 Fiji Delays DST Start by a Month
29-Sep-2020 Yukon to Stay Permanently on Daylight Saving Time
23-Mar-2020 Update: Israel Will Not Postpone DST

Updates in 2019
15-Aug-2019 Norfolk Island Introduces DST
19-Apr-2019 Morocco Changes Its Clocks for Ramadan 2019
28-Aug-2019 Brazil Scraps DST in 2019
18-Dec-2019 EU Committee Votes to Scrap DST
16-Jan-2019 São Tomé and Príncipe Returns to Old Time Zone
 
Upvote 0

emexes

Expert
Licensed User
Your life might be even simpler if (!) you can get your users to set their device OS time zone tracking correctly, otherwise you're chasing a constantly-moving target:

like this, which coincidentally appeared whilst updating my gps this evening:

1651047858583.png
 
Upvote 0

sn_nn

Member
Licensed User
Longtime User
Hi, Emexes! Thank you for help!
For now i am under developing the application, dedicated to TCM (Traditional Chineese Medicine). One part of application is calculating Local Solar Time for Birthday moment of patient. I need to know the real UTC for this moment and for concrete location (TimeZone). I plane to use database of TimeZones info for different periods, for writing data to SimpleTimeZone structure and calculate TimeOffset with New rules of SimpleTimeZone using Android abilities.
May be somebody can write an example, how to write and read data to SimpleTimeZone info using Reflection in b4a? (I'm not big specialist in Java)
 
Upvote 0
Top