Good Afternoon

select to_char(current_timestamp, 'Day') at time zone 'CET' 
produces Wednesday for Berlin

Martin 
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité

 
Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy 
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése 
nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi 
alkalmazhatósága sincs.  Mivel az electronikus üzenetek könnyen 
megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet 
tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 



Date: Wed, 1 Dec 2010 12:55:30 +0000
Subject: [GENERAL] A question about timezone
From: cad10...@gmail.com
To: pgsql-general@postgresql.org

Hello,

Sorry if I have posted this to the wrong mailing list. Its my first post.

I have a problem that I hope someone can help me with.

I have inherited a postgresql DB which has a table containing a day of the 
week, a time and a time zone. I need to translate all these times into UCT but 
I need to keep track of which day of the week the new time relates to.

e.g. this 2 timestamps go to different days

one=# select '2010-12-09 22:00:00' at time zone 'MSK'
one-# ;
      timezone       
---------------------
 2010-12-10 01:00:00
(1 row)

one=# select '2010-12-09 02:00:00' at time zone 'PST';
      timezone       
---------------------
 2010-12-08 18:00:00
(1 row)

how can I do this using only dow and time?


Thank you.
                                          

Reply via email to