Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 13 total
Thread date problem
Sat, May 25 2013 10:19 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

A user is filling in his birthdate through my WebApp as 15/07/1978.

In my DBISAM table the date is stored as 14/07/1978.

My formatsettings in the ONCREATE are

FormatSettings.DateSeparator:='/';
FormatSettings.ShortDateFormat:='dd/MM/yyyy';

Is this a bug?

Paul Waegemans



Attachments: dateproblem.pdf
Sat, May 25 2013 4:35 PMPermanent Link

Malcolm Taylor

Hmm, TZ ?
Mon, May 27 2013 11:28 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

This is a very anoying problem...    Is there a solution to solve this problem?


Paul Waegemans wrote:

A user is filling in his birthdate through my WebApp as 15/07/1978.

In my DBISAM table the date is stored as 14/07/1978.

My formatsettings in the ONCREATE are

FormatSettings.DateSeparator:='/';
FormatSettings.ShortDateFormat:='dd/MM/yyyy';

Is this a bug?

Paul Waegemans
Mon, May 27 2013 11:48 AMPermanent Link

Matthew Jones

<Paul Waegemans> wrote:
> This is a very anoying problem...    Is there a solution to solve this problem?
>
>
> Paul Waegemans wrote:
>
> A user is filling in his birthdate through my WebApp as 15/07/1978.
>
> In my DBISAM table the date is stored as 14/07/1978.
>
> My formatsettings in the ONCREATE are
>
> FormatSettings.DateSeparator:='/';
> FormatSettings.ShortDateFormat:='dd/MM/yyyy';
>
> Is this a bug?
>
> Paul Waegemans

The USA is on a holiday today (as is the UK coincidentally), so I guess
Time will respond Tuesday.
It may be worth checking out the Javascript generated to see if there is
anything of note, but I think there were known issues with that code that
are fixed in the next update.

--
Matthew Jones
Tue, May 28 2013 5:26 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<< A user is filling in his birthdate through my WebApp as 15/07/1978.

In my DBISAM table the date is stored as 14/07/1978.

My formatsettings in the ONCREATE are

FormatSettings.DateSeparator:='/';
FormatSettings.ShortDateFormat:='dd/MM/yyyy';

Is this a bug? >>

Yes, it appears to be an issue with converting the date/times back and forth
to UTC/GMT time.  I'll know more once I fix the issue.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, May 30 2013 1:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

It turns out that the issue is related to how the EWB runtime is creating
the client-side dates on the browser.  There are some trailing time elements
involved that are causing the TDateTime on the server side to modify the
date portion when it converts the date time from GMT to local during the
database modifications.

This is fixed in 1.02.

Thanks,

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Jun 3 2013 8:38 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

This is fixed in 1.02 in case the date is filled in by the user.
On the other hand the problem remains when doing:

with logboek1 do
      begin
      open;
      logboek1.Insert;
      ,,, adding values,,,
      Columns['Aktiedatum'].asdatetime:=date;
      Save;
      end;

When I look at "Aktiedatum" in my backoffice App the date shown today is 02/06/2013 instead off 03/06/2013...





"Tim Young [Elevate Software]" wrote:

Paul,

It turns out that the issue is related to how the EWB runtime is creating
the client-side dates on the browser.  There are some trailing time elements
involved that are causing the TDateTime on the server side to modify the
date portion when it converts the date time from GMT to local during the
database modifications.

This is fixed in 1.02.

Thanks,

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Jun 4 2013 2:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<< When I look at "Aktiedatum" in my backoffice App the date shown today is
02/06/2013 instead off 03/06/2013... >>

Okay, I'll see what's going on with that.

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Jun 14 2013 10:04 AMPermanent Link

Christian Kaufmann

>Yes, it appears to be an issue with converting the date/times back and forth
>to UTC/GMT time.  I'll know more once I fix the issue.

I think, I have a related problem.

My Delphi Http server prepares Json data for a TDataSet.LoadRows().
The datetime columns I set like this

Result := MilliSecondsBetween(myDateTime, EncodeDate(1970, 1, 1);

But in the EWB TGrid, all values are shown one hour more:

23. Mar 2013 - 10:33:21 is sown as 23. Mar 2013 - 11:33:21

My timezone is UTC+1, so I think, EWB treats datetimes in a dataset as
UTC datetimes.

So I'm not sure, if values for datetime columns in Json data always
should be UTC or if something in EWB is wrong.

I looked at WebCore and WebData but I'm not 100% sure about what is
correct.

cu Christian
Fri, Jun 14 2013 2:16 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Christian,

<< My Delphi Http server prepares Json data for a TDataSet.LoadRows(). The
datetime columns I set like this

Result := MilliSecondsBetween(myDateTime, EncodeDate(1970, 1, 1); >>

You're going to need to convert MyDateTime from local to UTC (including DST)
before doing this calculation.  On the EWB side, EWB simply uses a local
representation for DateToStr(), etc. so that the user sees their correct
local date/time.

<< My timezone is UTC+1, so I think, EWB treats datetimes in a dataset as
UTC datetimes. >>

Yes, that is correct.

Tim Young
Elevate Software
www.elevatesoft.com
Page 1 of 2Next Page
Jump to Page:  1 2
Image