java - Strange behavior with Timezone -


i run following java code :

timezone tz1 = timezone.gettimezone("etc/gmt-3"); system.out.println(tz1.getdisplayname()); 

the display gmt+03:00 !

it seems when use timezones ids such etc/gmtxx, sign reversed. why ?

that etc style :

http://en.wikipedia.org/wiki/zoneinfo

the special area of "etc" used administrative zones, particularly "etc/utc" represents coordinated universal time. in order conform posix style, zone names beginning "etc/gmt" have sign reversed people expect. in style, zones west of gmt have positive sign , east have negative sign in name (e.g "etc/gmt-14" 14 hours ahead/east of gmt.)


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -