SYSTEM_TIME_NOW one hour different from SYSTEM_TIME value

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Dave, Jon, Steve, Ian

neilnewman
Ebase User
Posts: 170
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

SYSTEM_TIME_NOW one hour different from SYSTEM_TIME value

#1

Postby neilnewman » Thu Oct 03, 2019 1:51 pm

Our SYSTEM_TIME value is one hour different from the SYSTEM_TIME_NOW value when calculated.
I have checked that the "USE SYSTEM TIME" is ticked in the admin tool.
Any ideas why this would be?
0 x

Jon
Moderator
Moderator
Posts: 1289
Joined: Wed Sep 12, 2007 12:49 pm

Re: SYSTEM_TIME_NOW one hour different from SYSTEM_TIME value

#2

Postby Jon » Fri Oct 04, 2019 8:14 am

I think this is because time fields use UTC and therefore SYSTEM_TIME_NOW gives you the number of seconds since midnight for UTC time (which is currently one hour less than BST).

What exactly are you trying to do? In general, it's going to be much easier to use Javascript than FPL to perform any date or time manipulations - using the Javascript Date object.
0 x

neilnewman
Ebase User
Posts: 170
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

Re: SYSTEM_TIME_NOW one hour different from SYSTEM_TIME value

#3

Postby neilnewman » Fri Oct 04, 2019 2:35 pm

Thanks Jon,
A colleague of mine is using the process to calculate time since a given event, I will forward your reply on to him.
Does the Javascript Date Object recognise BST, or are you saying that javascript is better suited to manipulate the values?


Thanks again
Neil
0 x

Jon
Moderator
Moderator
Posts: 1289
Joined: Wed Sep 12, 2007 12:49 pm

Re: SYSTEM_TIME_NOW one hour different from SYSTEM_TIME value

#4

Postby Jon » Mon Oct 07, 2019 7:34 am

Yes, Javascript is generally better. By default it will give you dates/times in the current timezone but it can also be used with UTC (same as GMT).
0 x


Who is online

Users browsing this forum: No registered users and 7 guests