tags:

views:

56

answers:

2

Hi i am using PHP to store the timezone.The timezone coming from dropdown and when I try to store it if its (GMT+5.30) or (GMT+anything) the plus symbol doesnt stored on database.It stored as (GMT 5.30).How can I store it correctly?

A: 

Store all your times in UTC, that way you can easily convert them to any timezone that you require.

As for the timezone - I would store this in a seperate column either with the offset from UTC or even better store the locale of the timezone e.g. "America/New_York" that way you can accomodate for daylight saving times also.

James
A: 

$url_safe = urlencode($string);

Treby
Your answer is good.Is there anyother way to store without encryption.
vinothkumar
can u post the insert string, so that i could check what went wrong with your sql code.
Treby