GMT Offset

Hello Folks!

Can someone please explain to me how I can work the GMT Offset in this macro?

As some of you know, it’s a day off from what appears due to being in America. I've tried a few options, performed a few searches, didn't see a solution - in the wiki, and conceded defeat. Please educate me.

Days from Today.kmmacros (3.8 KB)

Thanks much!

What do you mean?

The ICUDateTime tokens return the local time for the given unixtime (which is in UTC).

So %ICUDateTimePlus%1%Saturday%EEE, MMM d, yyyy HH:mm% would give the current time on the next Saturday.

I don't understand what you mean by this.


will give the date of the next Saturday (excluding today), regardless of your timezone.

About the only exception might be crossing daylight savings times, if the current time was near the daylight saving time switchover.

Now, if you use ICUDateTimeFor token, that will require you to be careful with the time you specify.

Last night, when I tried this, Sunday gave me the date of 2024-03-11 when Sunday is 2024-03-10. This is what I mean by a day off. The same happened for all the days/number combination. For some reason, it was a day ahead. I didn't place the time because I didn't need it - I only needed the date.

This morning the macro gave the proper date, but last night (between 10:30 PM and 11:40 PM) - the date was ahead by 1. I thought it had to do with the offset but apparently not.

If it happens again, I'll do a video but it happened exactly as above.

Thank you for your response,

EDITED: I just set my time zone to my current location in System Settings. I don't know why it was off. Maybe that's that's the issue (???). :confused:


I suggest you include the time if it happens again to see what time it is.

Because it should simply be adding a multiple of 24 hours to the time to get to the destination.

If this crosses a daylight savings change, and if it was within an hour of midnight, that could be an issue.

Just tried it. It happens after 11:00 PM or so. The time of this post is 11:39 PM on Saturday, March 9th.. Here is how one of my macros displays:

Screenshot 2024-03-09 at 11.38.50 PM.

The macro up top shows the same behavior.

It is weird. And earlier today, it displayed just fine. Late night antics I guess.

Edited: After 12:01 AM on Sunday, March 10th.

Screenshot 2024-03-10 at 12.01.10 AM

I still suggest this. Figure out what it thinks is the time.

Including the current time (ICUDateTimePlus 0 seconds).

Keyboard Maestro knows exactly what time it is. Using what you suggested, this is the result this morning @ 11:26 AM. If my syntax is incorrect, please correct me.

Thank you,

Your syntax looks fine. But add the h:mm a to the ICUDateTimePlus token format so we can see the time on the incorrect date.