Storing timestamps in text format

Поиск
Список
Период
Сортировка
От Radosław Smogura
Тема Storing timestamps in text format
Дата
Msg-id fc18163a29b69fecf56d6fd2dfdceccd@smogura-softworks.eu
обсуждение исходный текст
Ответы Re: Storing timestamps in text format  (Dave Cramer <pg@fastcrypt.com>)
Re: Storing timestamps in text format  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
Hi,

I perform following test:
1. Open connection (GMT+1)
2. Change timezone (GMT+3)
3. Write created timestamp.
4. Change timezone to different connection open and write (GMT+4)
5. Read timezone

During this I saw driver sends timestamp encoded with initial (in my case
+1), form connection open, time zone. It's because
TimestampUtils.toString(Calendar, Timestamp) uses defaultCal. Should it use
Calendar.getInstance() or new GregorianCalendar?

    public synchronized String toString(Calendar cal, Timestamp x) {
        if (cal == null)
            cal = defaultCal; // = Calendar.getInstance() // new
GregorianCalendar()


--
----------
Radosław Smogura
http://www.softperience.eu

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Radosław Smogura
Дата:
Сообщение: Re: Workarounds for getBinaryStream returning ByteArrayInputStream on bytea
Следующее
От: Francesco Degrassi
Дата:
Сообщение: Postgresql XA prepare() method behaviour