Re: Selection to JSON Date Conversion

2018-10-10 Thread Douglas Cryer via 4D_Tech
Helge,

Re:
use

SET DATABASE PARAMETER([Booking];JSON use local time;0)  // scope current 
process

before the json command.

Many thanks, that is exactly what I was looking for __.  I had already post 
parsed everything to fix the dates.  It has little impact and removes the 
useless time portion so I will stick with that till v17.

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.com 


 

On 10/10/2018, 12:48, "4d_tech-boun...@lists.4d.com on behalf of 
4d_tech-requ...@lists.4d.com" <4d_tech-boun...@lists.4d.com on behalf of 
4d_tech-requ...@lists.4d.com> wrote:

use

SET DATABASE PARAMETER([Booking];JSON use local time;0)  // scope current
prosess

before the json command.





**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Selection to JSON Date Conversion

2018-10-10 Thread Douglas Cryer via 4D_Tech
Miyako,

Based on your reply it looks like I have to accept that I will either have to 
write my own version of Selection to JSON or I will have to post parse the 
resulting dates to correct them at least while I am still on v15 4D.  I have 
already seen the impact of setting the "Dates inside objects" parameter in v17 
and know that solves the problem in the future.  I should have been more 
specific in my query to see if there was an easy fix in v15 and v16.

It is a shame that the person who wrote Selection to JSON did not put a little 
more thought into the data conversion issue.  It is a date only field after all 
there is no implication on time other than within the date.  Good to see this 
has been rectified in v17 but that does not help me...

Re: Patrick Emanuel - is that helpfull ?
No.

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.com 






**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Selection to JSON Date Conversion

2018-10-10 Thread 4dialog via 4D_Tech
use

SET DATABASE PARAMETER([Booking];JSON use local time;0)  // scope current
prosess

before the json command.



-
Hilsen
--
Helge Antonsen
www.4dialog.no 
--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Selection to JSON Date Conversion

2018-10-09 Thread Patrick Emanuel via 4D_Tech
is that helpfull ?

4D-Forum disucssion
  



-
Patrick EMANUEL

Administrator
www.association-qualisoft.eu 
(Soft1002, Simply Asso & QS_Toolbox)
--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Selection to JSON Date Conversion

2018-10-09 Thread Keisuke Miyako via 4D_Tech
they way 4D - JSON date conversion works is that you get back what to put in,
so you need not care what the internal storage looks like.

18/05/2018! (implied midnight local time) may be stored as the day before in 
stringify'd UTC,
but when you read the date back in 4D language (OB Get) you get the original 
date.

that said, in your case,
it seems like you need to configure the "Dates inside objects" database 
parameter
to suit your needs.

http://doc.4d.com/4Dv17/4D/17/SET-DATABASE-PARAMETER.301-3730407.en.html

> 2018/10/09 21:13、Douglas Cryer via 4D_Tech <4d_tech@lists.4d.com>のメール:
> I am sure that 4D is trying to be very clever but I just don't get it and I 
> am hoping that someone can tell me what I am missing and how to fix this 
> other than rolling my own version of Selection to JSON...




**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Selection to JSON Date Conversion

2018-10-09 Thread Douglas Cryer via 4D_Tech
Help,

I have just hit a problem with Selection to JSON that has me floored and I am 
hoping somebody can point me to missing setting or to my ignorance.

When including date fields in a template and using it with Selection to JSON 
dates that fall inside of BST the dates are being corrupted by taking off an 
hour making them the day before.

So a date like !18/05/2018! Is output as "2018-05-17T23:00:00" (date is in BST)

Whereas a date like !17/03/2018! Is output as "2018-03-17T00:00:00" (date is in 
GMT)

I am sure that 4D is trying to be very clever but I just don't get it and I am 
hoping that someone can tell me what I am missing and how to fix this other 
than rolling my own version of Selection to JSON...

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.com 







**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**