GithubHelp home page GithubHelp logo

Comments (2)

eulerto avatar eulerto commented on May 20, 2024

@jiamo wal2json uses the same output as the corresponding data type. Take a look at backend/utils/adt/datetime.c, function EncodeTimezone. If the timezone have its minute part as zero, it is not printed (which means that -03:00 will be printed as -03 and -03:30 will be printed as -03:30 ). AFAIR ISO 8601 supports minutes omission in timezone specification (-07:00 is the same as -07 ).

The output depends on DateStyle parameter (read [1]).

postgres=# show DateStyle;
 DateStyle 
-----------
 ISO, MDY
(1 row)

postgres=# select now();
              now              
-------------------------------
 2018-05-23 02:56:06.535951+00
(1 row)

postgres=# set DateStyle to 'SQL';
SET
postgres=# select now();
              now               
--------------------------------
 05/23/2018 02:56:27.382021 UTC
(1 row)

postgres=# set DateStyle to 'Postgres';
SET
postgres=# select now();
                 now                 
-------------------------------------
 Wed May 23 02:56:37.656014 2018 UTC
(1 row)

[1] https://www.postgresql.org/docs/10/static/datatype-datetime.html#DATATYPE-DATETIME-OUTPUT

from wal2json.

jiamo avatar jiamo commented on May 20, 2024

I got it.

from wal2json.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.