• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem in converting date to Indian time zone

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • 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
2010-02-17

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.

Regards,

 
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic