Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Clarifying LocalizeDateTimeColumns
Tue, May 30 2017 4:38 PMPermanent Link

KimHJ

Comca Systems, Inc

I'm using EWB with EDB.

If LocalizeDateTimeColumns is set to true, then every date and Time Is save in the database will be converted from local to UTC.

When I retrieve any date and time from the database it will be converted from UTC to the local time of the computer.

Any default date and time in the database have to have CURRENT_DATE(UTC) or CURRENT_TIME(UTC)

This way if the Server is on the East Coast and I'm on the West Coast I get the correct date and time for the West Coast.

Is this correct?

Kim
Wed, May 31 2017 12:57 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kim,

<< If LocalizeDateTimeColumns is set to true, then every date and Time Is save in the database will be converted from local to UTC. >>

There are two sides to consider here:

-- Browser --

If you enable LocalizeDateTimeColumns on the *browser* side in the EWB application, then this *only* affects how the DateTime values are treated when converted to/from strings.  In other words, it won't affect how the DateTime values are stored, and they will be sent over to the EWB Web Server as UTC date-time values.  For example, if you store the result of the Now() function in a DateTime column in a TDataSet instance, the value stored will be the local browser date-time in UTC.

-- EWB Web Server --

With the EWB Web Server, you can specify whether datasets should/should not localize date-time columns.  This will cause the EWB Web Server to convert any date-time values in a dataset to UTC before sending them to the browser as JSON in a "load rows" operation.  Likewise, when a transaction commit is sent to the EWB Web Server, it will cause the EWB Web Server to convert any date-time values in the incoming JSON to local time.

So, in general, the real determining factor here is whether you wish to store date-time values in UTC format or in local time format in the database on the server machine hosting the EWB Web Server.  Most of the time, I would say that you *want* to localize all date-time values on the web server side in order to facilitate easier usage for local/regional clients that may be accessing the same database tables.  However, if all of the clients are remote and only access the data through EWB (or something similar), then there's really no point in localizing the date-time values on the server.

I hope that makes sense...

Tim Young
Elevate Software
www.elevatesoft.com
Wed, May 31 2017 4:00 PMPermanent Link

KimHJ

Comca Systems, Inc

Tim Young [Elevate Software] wrote:

>>There are two sides to consider here:<<

Thanks Tim, you confirmed what I understood from the manual.

Kim
Thu, Jun 1 2017 10:11 PMPermanent Link

KimHJ

Comca Systems, Inc

Tim,

I check the LocalizeDateTimeColumns in my Dataset in EWB it is linked to a grid, when the date and time show it shows what I see in the database wich are UTC date and time, It is not converted to EST time.

What I'm missing?

Kim
Fri, Jun 2 2017 11:13 AMPermanent Link

KimHJ

Comca Systems, Inc

KimHJ wrote:

<<I check the LocalizeDateTimeColumns in my Dataset in EWB it is linked to a grid, when the date and time show it shows what I see in the database wich are UTC date and time, It is not converted to EST time. >>

Today I open the browser and it have the local time, maybe the browser was not updated after I uploaded the new program with the LocalizeDateTimeColumns checked, even I opned the browser and went thru the login screen??

Kim
Mon, Jun 5 2017 5:01 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kim,

<< I check the LocalizeDateTimeColumns in my Dataset in EWB >>

In the Object Inspector for the TDataSet component instance in your application, or in the Database Manager in the IDE ?

Tim Young
Elevate Software
www.elevatesoft.com
Image