• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Problem in converting date to Indian time zone

Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Experts ,

Am working on a projects that creates tickets and stores it in the data base we also store the date at witch the ticket is created .

Tickets date of creation is pretty important as we generate reports base on "Ticket Creation Date".

Our site is hosted in USA and we work in India . So the problem is that when we test our code in India it works perfectly OK .

But when we host it the ticket creation date changes , depending upon the date time difference between India and USA. ( works normally and consistently but with date time difference!!! )

Am trying to do something like this :

The Output : dateString = 18/02/2010
date Wed Feb 17 12:30:00 CST 2010

See what the problem is i am getting what i want in the variable "dateString" ("IST" date) , but as soon as a try to parse it into Mysql date for insertion then again i get (US date)
that i do not want to insert into my data base .

I am doing this so that i parse it in the proper MySql format

In short i want to insert is this : 18/02/2010 (2010-02-18)
but instead the value getting inserted is : 2010-02-17

What is it that am doing wrong . What should i be doing instead?

Please help me out.


Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic