openGeeksLab / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

iOS only - TimeZone getRawOffset() always returns device's TimeZone offset, regardless of specific TimeZone instance used #1369

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

Please clearly state whether the issue relates to a device/the simulator or
the tools.
If related to a device be sure to specify exactly which device with as much
details as possible.

iOS bug only.  Simulator and Android work as expected.

What steps will reproduce the problem?

Easiest and clearest example is for GMT...

1. TimeZone gmtTZ = TimeZone.getTimeZone("GMT");

2. int offset = gmtTZ.getRawOffset();

3. examine raw offset value

What is the expected output? 

Expect that the offset is 0 for GMT

What do you see instead?

offset = your device's TimeZone's offset ( e.g. -28800000 if your device's 
TimeZone is "America/Los_Angeles" ).

Note, doesn't matter which TimeZone instance is selected in step 1, the result 
will always be the device's current TimeZone's offset.

Original issue reported on code.google.com by mallo...@gmail.com on 24 Feb 2015 at 1:39