Timezones in sybase databases

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Tubbietoeter
Forum Contributor
Posts: 149
Joined: Fri Mar 14, 2003 2:41 am
Location: Germany

Timezones in sybase databases

Post by Tubbietoeter »

Hi,


I have a sybase-based database here (Micromuse Netcool Object Server) and I want to convert the dates that are stored in this DB on UTC into a different timezone the user can chose before displaying the output on the web.
However, until now I have not found a way to achieve this.

Does someone have an idea?

Thanks,

Steff
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

As long as all the times in the database are recorded in the same timezone you can simply ask the user for their own time zone and then add or subtract 60*60*difference_in_user_time_zone_from_servers.
Tubbietoeter
Forum Contributor
Posts: 149
Joined: Fri Mar 14, 2003 2:41 am
Location: Germany

Post by Tubbietoeter »

Thanks, I guess this will do. :)
Post Reply