postgres-utc-timestamp

Parse timestamp without time zone values as UTC timestamps. This was created to parse datetime values written from Rails apps. Rails always writes UTC timestamps, so the application reading must know to parse it as UTC. The default pg parser parses them as local timestamps.

Usage no npm install needed!

<script type="module">
  import postgresUtcTimestamp from 'https://cdn.skypack.dev/postgres-utc-timestamp';
</script>

README

postgres-utc-timestamp

Parse timestamp without time zone values as UTC timestamps. This was created to parse datetime values written from Rails apps. Rails always writes UTC timestamps, so the application reading must know to parse it as UTC. The default pg parser parses them as local timestamps.