DateTime.TimeZoneOffset returns either -5 or -4 (Daylight saving Time) for New York and -6 or -5 (Daylight saving Time) for Chicago. As you can see, I could get -5 for both cities depending on whether Daylight Saving time is in effect and I have to handle the tricky Daylight Saving time related issue myself.
One solution is to use Timezone ID (such as "America/New_York" and "America/Chicago"). In my php code, I need to call date_default_timezone_set() function which expects a Timezone ID, i.e.,
I'm wondering what are some easy ways in B4A to get the phone device's Timezone ID.
One solution is to use Timezone ID (such as "America/New_York" and "America/Chicago"). In my php code, I need to call date_default_timezone_set() function which expects a Timezone ID, i.e.,
B4X:
date_default_timezone_set("America/New_York");
I'm wondering what are some easy ways in B4A to get the phone device's Timezone ID.