• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reg Custom Time Zone in java.  RSS feed

 
Thennam Pandian
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Have configured the custom Time Zone (SAST) in the Linux box.
The sh clock of the Linux box gives the custom Time Zone (SAST).
Whereas the java application gives the date in GMT Time Zone.

Noticed from the java docs that, if the custom time zone string (SAST) doesn't match the syntax ( like GMT +Value or GMT-Value) , "GMT" is used.
Even if we create SimpleTimeZone with offset from GMT, it displays the date in “GMT” format. It won’t display the custom Time Zone.


Could anybody please suggest me a way to support Custom Time Zone in java?
(i.e.) The java application should give the date in custom Time Zone (SAST) instead of GMT format.

FYI : Java version : "1.5.0_17"

================== Snippet from java docs====================================

The format is locale independent and digits must be taken from the Basic Latin block of the Unicode standard. No daylight saving time transition schedule can be specified with a custom time zone ID. If the specified string doesn't match the syntax, "GMT" is used.

Java doc URL : http://java.sun.com/j2se/1.4.2/docs/api/java/util/TimeZone.html

 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!