Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Timezones  RSS feed

 
Arjun Shastry
Ranch Hand
Posts: 1903
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am not understanding why second part of code is not displaying the time according to respective timezones.
Following code works correctly.That is, it shows the corresponding time in that timezone.

but this doesn't

Above code displays only Local machine time!
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you should post the code where you're creating the timezone that gets passed into printTimeZone as a parameter.
 
Arjun Shastry
Ranch Hand
Posts: 1903
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TimeZone reference has been passed correctly as prior to that I am printing all available TimeZones.
Problem seems to be that DateFormat is must while printing local time of any TimeZone.
Is it possible to get local time of any timezone without using DateFormat?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!