Postgres Timezone change
-
- Posts: 5
- Joined: Sat 24 Oct 2009 20:59
Postgres Timezone change
Hi,
How do I change the timezone of Postgres session?
Thanks
Roberto Chostakovis
How do I change the timezone of Postgres session?
Thanks
Roberto Chostakovis
You should execute the following SQL command:
Code: Select all
SET TIME ZONE
-
- Posts: 5
- Joined: Sat 24 Oct 2009 20:59
-
- Posts: 5
- Joined: Sat 24 Oct 2009 20:59
How do I change this?
I am using UniDAC in a webserver application that runs under GMT+0.
I have users from many timezones using it and I have to convert the timestamp for their location.
I have to be able at least to sum or subtract # hours from timestamp. How I do that?
Regards
Roberto Chostakovis
I am using UniDAC in a webserver application that runs under GMT+0.
I have users from many timezones using it and I have to convert the timestamp for their location.
I have to be able at least to sum or subtract # hours from timestamp. How I do that?
Regards
Roberto Chostakovis
-
- Posts: 5
- Joined: Sat 24 Oct 2009 20:59
-
- Posts: 5
- Joined: Sat 24 Oct 2009 20:59
Thank you! I got how it works and create a workaround.
I´ve changed the PgObjectsUni.pas in the following ways:
1 - Change the TimeZoneInformation variable to UniDACPgTimeZoneInfomation and moved it to Interface section, making it Global.
2 - Changed the functions that use this variable.
3 - The UniDACPgTimeZoneInformation is initialized as it was, with no change.
On my projet, I include PgObjectsUni at uses clausule and at runtime changed the bias value to reflect the timezone that I want.
I think that is a very simple way to give flexibility to UniDAC to handle with timezones.
Would you like that I send the PgObjectsUni.pas to you?
Regards
Roberto Chostakovis
I´ve changed the PgObjectsUni.pas in the following ways:
1 - Change the TimeZoneInformation variable to UniDACPgTimeZoneInfomation and moved it to Interface section, making it Global.
2 - Changed the functions that use this variable.
3 - The UniDACPgTimeZoneInformation is initialized as it was, with no change.
On my projet, I include PgObjectsUni at uses clausule and at runtime changed the bias value to reflect the timezone that I want.
I think that is a very simple way to give flexibility to UniDAC to handle with timezones.
Would you like that I send the PgObjectsUni.pas to you?
Regards
Roberto Chostakovis