![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 8 of 8 total |
![]() |
Fri, Oct 28 2016 5:23 PM | Permanent Link |
Trinione | Hi:
Saving the Now value adds exactly 4 hours to the saved time in a TimeStamp field. For example: ------------------------------------------ dtTme := Now; // time as 2016-10-28 17:15:02... (5:15 PM) ds.Columns['theDateTime'].AsDateTime := dtTme; // this saves the time as 2016-10-28 21:15:02... (9:15 PM) ------------------------------------------ Note: Setting the field as Generated with 'Generate As Expression' to 'CURRENT_TIMESTAMP' results in the correct time being saved. Is this a bug when saving a TimeStamp field type from EWB to EDB? |
Sat, Oct 29 2016 4:57 AM | Permanent Link |
Walter Matte Tactical Business Corporation | No Bug - Localization - Time Zone.
Walter Trinione wrote: Hi: Saving the Now value adds exactly 4 hours to the saved time in a TimeStamp field. For example: ------------------------------------------ dtTme := Now; // time as 2016-10-28 17:15:02... (5:15 PM) ds.Columns['theDateTime'].AsDateTime := dtTme; // this saves the time as 2016-10-28 21:15:02... (9:15 PM) ------------------------------------------ Note: Setting the field as Generated with 'Generate As Expression' to 'CURRENT_TIMESTAMP' results in the correct time being saved. Is this a bug when saving a TimeStamp field type from EWB to EDB? |
Sat, Oct 29 2016 5:25 AM | Permanent Link |
Trinione | Walter Matte wrote:
<< No Bug - Localization - Time Zone.>> How is this addressed though? |
Sat, Oct 29 2016 1:12 PM | Permanent Link |
Raul Globestar Systems ![]() | On 10/29/2016 5:25 AM, Trinione wrote:
> > How is this addressed though? > EWB (javascript) works in UTC so you'd need to take that into account when displaying in general. Similarly on EDB side use CURRENT_TIMESTAMP(UTC) for EDB to default UTC timestamp vs local. Raul |
Sat, Oct 29 2016 3:35 PM | Permanent Link |
Trinione | So, how can the value of Now be converted to seconds since that 1970 date so it will be accepted by EDB properly?
|
Sun, Oct 30 2016 6:50 AM | Permanent Link |
Walter Matte Tactical Business Corporation | function NowLocal : DateTime;
begin result := Now - (TimeZoneOffSet(now) * 60 * 1000); end; |
Sun, Oct 30 2016 11:43 AM | Permanent Link |
Trinione | Walter:
Thank you very much, that works perfectly. |
Tue, Nov 1 2016 3:31 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | << Saving the Now value adds exactly 4 hours to the saved time in a TimeStamp field. For example: >> If you're using the EWB Web Server with the dataset support, make sure that the....damn, I just realized something - in the switch to the new database design in EWB, I forgot to add the LocalizeDateTimeColumns option back in for the datasets. That option is the option that you can use to specify that you want dates/times localized/converted to UTC when the EWB web server reads from or writes to the dataset on the back-end. I'll need to add this back in as part of the new build I'm doing this week. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, March 29, 2023 at 10:59 PM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |