0
votes
2answers
50 views

Postgresql: assign default timezone during table creation [duplicate]

I have the following definition of employees table CREATE TABLE employees ( id integer NOT NULL, name text, withouttz timestamp without time zone, withtz timestamp with time zone, ...
0
votes
1answer
60 views

ISO-8601 format date for PostgreSQL

I have a question about type of data about a Postgres data. I have string containing an ISO-8601 formatted date/time format (as example:"2013-05-21T15:00:00+0200") and Timezone (as example: ...
0
votes
2answers
65 views

Using current time in UTC as default value in PostgreSQL

I have a column of the TIMESTAMP WITHOUT TIME ZONE type and would like to have that default to the current time in UTC. Getting the current time in UTC is easy: postgres=# select now() at time zone ...
0
votes
2answers
63 views

Postgres: get local timestamp with time zone of latest midnight

I'm in the Time Zone Europe/Berlin (+02), Postgresql is running at UTC (+00). I need to get the timestamp with time zone at the latest local midnight date (The start of day date of the current day in ...
2
votes
3answers
90 views

Postgresql, pgAdmin, Java: How to make them all UTC?

How can I make sure my entire development environment around PostgreSQL is not messing about with local timezones. For simplicity I need to be 100% sure that each and every time(stamp) value is UTC. ...
2
votes
1answer
69 views

Django Timezone Handling with Postgres

I recently upgraded a Django project from 1.3 to 1.5 in order to start using the timezone handling. Because I am a moron, my Django timezone was set to "America/NewYork" instead of using UTC. Turning ...
1
vote
2answers
48 views

How to extract consistent year from timestamptz

I'm trying to use the Postgres function extract() to get the year from a timestamptz column, but get unexpected results. I expected that it would use UTC, but appears to use whatever the local ...
0
votes
1answer
133 views

How to make TIMESTAMP WITH TIME ZONE column with Ruby Sequel?

I am learning Ruby and Sequel, and trying to make some table. I want to save my time value as in UTC in PostgreSQL database. So I made a table with db.create_table :TestTable1 do Timestamp ...
1
vote
2answers
869 views

Postgres Timestamp

We are having a debate about the best way to store a timestamp in postgres. Currently all time stamps are stored as +00 and we have a timezone associated with each client. We look up the timezone and ...
4
votes
1answer
395 views

Model's datetime field is stored differently on heroku from localhost

Steps: On my localhost server I select the time Jan 18, 2013 10 am - 11 am in my browser located in the Pacific time zone. I then select the exact same time on my production server on heroku. As ...
1
vote
1answer
118 views

Should Postgres timezone be changed from UTC?

I have a cron that runs a script in my rails app hourly looking for new transactions to run. Typically this only picks up new transactions set to start on the current day, until midnight UTC, when all ...
1
vote
1answer
124 views

OSX postgres 9.1.4 timestamp with time zone order by

At OSX 10.8 on postresql server 9.1.4 is a unexpected behavior. Since on Ubuntu 12.04 it was correct. To reproduce this issue use the the following postgres sql example database. Note: The timestamp ...
1
vote
3answers
120 views

What is an appropriate data type to store a timezone?

I'm thinking of simply using a string in the format "+hh:mm" (or "-hh:mm"). Is this both necessary and sufficient? Note: I don't need to store the date or the time, just the timezone.
2
votes
2answers
160 views

How to save and retrieve these timestamps with the specified timezone using Joda Time, JPA, EclipseLink and Postgres

This seems like it would be a common problem so perhaps I am missing something obvious. Using Joda Time I want to persist dates with a timezone. If I wasn't using JPA I would want to do something like ...
4
votes
1answer
328 views

Strategy about working with timezones in postgresql

I need to work with multiple timezones in my application. Basically my system generates data and customers from anywhere on the planet can get access to it. Since my data have an associated ...

1 2 3 4 5
15 30 50 per page