šŸ•’ System/GMT Time - Solved!

Asian reporting in. Seems like something is off somewhere, maybe a date/time column format?

Am I seeing that right that my app shows October 2nd, but yours returns October 1st for the GMT day number??? @ThinhDinh mentioned in an earlier post that the short date format seems to work better than long because of language differences, so that’s one thing to try.

Checking your math, it checks out with the formula you are currently using and the values you are getting, so I think that’s also part of the the problem. The day part of the formula should only ever return -24, 0, or 24 to account for the GMT and LDT crossing different days and if you are before it after gmt time. You have the extra multiply part, which doesn’t seem to fit. I modified the original formula a few times, so I would at least make sure you are using the latest iteration.

(5-21)
+
(241-29)

=

-16
+
-696

=

-712

However, that doesn’t explain why GMT is calculating into the future. Have you tried different date formats for the NOW column, like @ThinhDinh mentioned?

How is your template column set up? I assume you are adding ā€˜GMT’? Can you try ā€˜GMT+0’ or UTC as the suffix to see what that does.

yeah, I had noticed his comment about that and tried different formats, all with the same results. I think that issue only comes into play if you are using languages other than English.

I had tried GMT and UTC. I just tried GMT+0, same result.

Let me check and make sure my formula is right, and I’ll let you know.

I’d also be curious if different systems are interpreting GMT differently. I wonder if Mac vs windows vs Android vs iOS would show different results.

I just switched mine to use the same formula as in the current iteration of your app, and now I’m getting the same result (-40), as expected.

(hour(GMT)-hour(LDT))

+

(24 
* 
(ABS(day(GMT)-day(LDT))
/
(day(GMT)-day(LDT)))
)

+

(minute(GMT)-minute(LDT))/60

I’ve tested on my phone (IOS) and my laptop (MacOS) and both give the same result. I don’t have anything that isn’t apple to test with, I’m afraid :stuck_out_tongue:

Anyway, it seems that minute/hour/day(GMT) are no longer giving the expected results.
I wonder why that would have suddenly changed?
Are you still getting the expected results in your part of the world?

So it’s interpreting the current GMT time as 6am on the 1st October. I don’t know if this is a coincidence, but that’s 8 hours ahead of my current time, whereas the true GMT time is 8 hours before my current time.

1 Like

That is so weird. It’s working fine in my timezone, but I flipped my phone to Singapore time and got the same results as you. I’m not sure what I’m missing, unless something changed on Glide’s back end to interpret GMT differently, but it doesn’t make sense. I’ll have to do some research on this.

My time

Your time

1 Like

Yes, I think we should definitely blame Mark or Jason :rofl:

I’m curious to see if anything changes once we roll over to the 1st of the month…

I might have to switch to an experimental code option, but I try to avoid those unless absolutely necessary.

I simplified it by using the time in google sheet as the standard time

I think it may be OS specific…
I just asked my son, who is in Melbourne Australia, to test with his Windows machine and send me a screen shot…

Which is correct… hmm

you can change the time zone on your phone

You know, it would be a lot easier if they did this math for us. :wink: I’ll play with this when I’m done working and by my computer. I’m curious about the month thing too. Maybe this is an OS level bug that you just discovered.

I checked and it is -41 while mine is +7

1 Like

Is that MacOS or Windows? (I’m guessing MacOS)

When the time is taken from the device, it is a vulnerability to cause manipulation errors. This I fixed by taking the time on google sheet as standard

Windows

I’ll try this later on my personal computer later, but this might be some to play with to see what kind of results it gives in your timezone.

Obviously flip the date to the incorrect dd/mm/yyyy format in your case. :wink:

I get it one day in the future……

@Jeff_Hager it just ticked over to the 1st of October here in Singapore, and guess what…

WTF??? :scream: :rofl: :rofl:

1 Like

Clearly it’s not a problem with my logic, but a problem with typescript itself. I don’t make those kinds of mistakes. :wink:

4 Likes