• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TimeZone Date convertion

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks!

I want to convert a Date from an specific TimeZone to GMT-00:00 timezone
I already tried to set a Calendar with the date and set the Time Zone but it didn't work...

Any idea?
Thanks!
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How did it not work? How about giving some code that shows ...
 
Joao Cunha
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Initially I have a time on an specif TimeZone:

> Calendar c = Calendar.getInstance();
> c.setTime(date);
> System.out.println(c.getTime());

I want to have this time on GMT-00:00 time zone.
I tried this, but it didn't work:

>c.setTimeZone(TimeZone.getTimeZone("GMT-00:00"));
>System.out.println(c.getTime());
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic