Olá 2009/10/29 Welington R. Braga <[email protected]>
> Salve todos, > > Pessoal, recebi um chamado a respeito de um problema com a questão de > horário nas bases de dados em que as aplicações não estão pegando o > horário correto. > > O meu lc_time no postgres.conf esta como: > > lc_time = 'pt_BR.UTF-8' > > Pelo prompt do servidor o horário está OK, mas no Postgres, não. Qual > é a forma "mais inteligente" de se resolver este problema? > > postg...@vm010:/home/wbraga$ date -R > Thu, 29 Oct 2009 10:35:10 -0200 > > postg...@vm010:/home/wbraga$ psql Jardim -c "SELECT now();" > now > ------------------------------- > 2009-10-29 09:35:11.526255-03 > (1 registro) > > postg...@vm010:/home/wbraga$ > Você precisa alterar o time zone no banco[1] para respeitar o horário de verão.[1][2] #ALTER DATABASE BANCO SET TimeZone=”Brazil/DeNoronha”; "...Time zones, and time-zone conventions, are influenced by political decisions, not just earth geometry. Time zones around the world became somewhat standardized during the 1900's, but continue to be prone to arbitrary changes, particularly with respect to daylight-savings rules. PostgreSQL currently supports daylight-savings rules over the time period 1902 through 2038 (corresponding to the full range of conventional Unix system time). Times outside that range are taken to be in "standard time"for the selected time zone, no matter what part of the year they fall in. ..." [1] http://www.postgresql.org/docs/8.3/static/datatype-datetime.html [2] http://keniamilene.wordpress.com/category/categorias/banco-de-dados/postgresql/<-- em Projeto de Migração do PostgreSQL 8.1 pra 8.2.5 – FASE 4 -- Marcelo Costa www.marcelocosta.net ------------------------------------------------- echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc “You can't always get what want”, Doctor House in apology to Mike Jagger
_______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
