Hi all, I am currently extending the NodeJS connector for MonetDB, that communicates with the mserver process using Mapi. However, I face some unexpected behavior when I insert timestamptz values into a table and then retrieve it. This is the Mapi: TX: sCREATE TABLE bar (a timestamptz); RX: &3 TX: sINSERT INTO bar VALUES ('2015-10-29 11:31:35.000000+01:00'); RX: &2 1 -1 TX: sSELECT * FROM bar; RX: &1 0 1 1 1 % sys.bar # table_name % a # name % timestamptz # type % 32 # length [ 2015-10-29 10:31:35.000000+00:00 ] As you can see, inserting the timestamptz string '2015-10-29 11:31:35.000000+01:00', results in it being stored as its equivalent '2015-10-29 10:31:35.000000+00:00'. If I do the same with mclient, this does not happen, and I get the exact same string back. Does anyone know why this might be happening?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 mclient starts off with setting the time zone. Then subsequent time stamps are translated to that time zone before being sent to the client. The first query mclient sends is: SET TIME ZONE INTERVAL '+01:00' HOURS TO MINUTE (if your current time zone happens to be wintertime in Amsterdam). On 29/10/15 13:29, Robin Cijvat wrote:
Hi all,
I am currently extending the NodeJS connector for MonetDB, that communicates with the mserver process using Mapi. However, I face some unexpected behavior when I insert timestamptz values into a table and then retrieve it. This is the Mapi:
TX: sCREATE TABLE bar (a timestamptz); RX: &3
TX: sINSERT INTO bar VALUES ('2015-10-29 11:31:35.000000+01:00'); RX: &2 1 -1
TX: sSELECT * FROM bar; RX: &1 0 1 1 1 % sys.bar # table_name % a # name % timestamptz # type % 32 # length [ 2015-10-29 10:31:35.000000+00:00 ]
As you can see, inserting the timestamptz string '2015-10-29 11:31:35.000000+01:00', results in it being stored as its equivalent '2015-10-29 10:31:35.000000+00:00'. If I do the same with mclient, this does not happen, and I get the exact same string back. Does anyone know why this might be happening? _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
- -- Sjoerd Mullender -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWMhLeAAoJEISMxT6LrWYghY4H/0NaW7hCc90nG8L4w43KgUc+ sxtGY3oRF9b/dnDXkTrrRK2vgAy/mf4TvNVLYRwcUeNnCHNvg+pvovQqf8zICei5 +ZdfCZ07ley4CIggl2DreOQyAR6LBj1DNIyjO2iRheqoa2CxIYgdKfoa4nECKfYJ hRF+Fx1c0+/MkWLzXe/xFavA0kc1d9r6O778gLW/A5PRZq9JNo5ddTSqggE/8+nl 0R5TKpe34+/ob7U/AKyqLjummpXcNrVmw5XXghNJrO8LQPRGVwSib3W3Pzcpeybo VEn3oH6VVZRiwa31TCDZ24kU7uYe4Tf//KlnrJ8InlhtEmKGbHj2JbuPTzPpOVs= =ZDhb -----END PGP SIGNATURE-----
Ok, thanks a lot! On 29-10-15 13:36, Sjoerd Mullender wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
mclient starts off with setting the time zone. Then subsequent time stamps are translated to that time zone before being sent to the client. The first query mclient sends is:
SET TIME ZONE INTERVAL '+01:00' HOURS TO MINUTE
(if your current time zone happens to be wintertime in Amsterdam).
On 29/10/15 13:29, Robin Cijvat wrote:
Hi all,
I am currently extending the NodeJS connector for MonetDB, that communicates with the mserver process using Mapi. However, I face some unexpected behavior when I insert timestamptz values into a table and then retrieve it. This is the Mapi:
TX: sCREATE TABLE bar (a timestamptz); RX: &3
TX: sINSERT INTO bar VALUES ('2015-10-29 11:31:35.000000+01:00'); RX: &2 1 -1
TX: sSELECT * FROM bar; RX: &1 0 1 1 1 % sys.bar # table_name % a # name % timestamptz # type % 32 # length [ 2015-10-29 10:31:35.000000+00:00 ]
As you can see, inserting the timestamptz string '2015-10-29 11:31:35.000000+01:00', results in it being stored as its equivalent '2015-10-29 10:31:35.000000+00:00'. If I do the same with mclient, this does not happen, and I get the exact same string back. Does anyone know why this might be happening? _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
- -- Sjoerd Mullender -----BEGIN PGP SIGNATURE----- Version: GnuPG v2
iQEcBAEBCAAGBQJWMhLeAAoJEISMxT6LrWYghY4H/0NaW7hCc90nG8L4w43KgUc+ sxtGY3oRF9b/dnDXkTrrRK2vgAy/mf4TvNVLYRwcUeNnCHNvg+pvovQqf8zICei5 +ZdfCZ07ley4CIggl2DreOQyAR6LBj1DNIyjO2iRheqoa2CxIYgdKfoa4nECKfYJ hRF+Fx1c0+/MkWLzXe/xFavA0kc1d9r6O778gLW/A5PRZq9JNo5ddTSqggE/8+nl 0R5TKpe34+/ob7U/AKyqLjummpXcNrVmw5XXghNJrO8LQPRGVwSib3W3Pzcpeybo VEn3oH6VVZRiwa31TCDZ24kU7uYe4Tf//KlnrJ8InlhtEmKGbHj2JbuPTzPpOVs= =ZDhb -----END PGP SIGNATURE----- _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
participants (2)
-
Robin Cijvat
-
Sjoerd Mullender