Understanding TimeZoneOffset The TimeZoneOffset function returns the difference between the local time and UTC in minutes. This value can be positive or negative depending on your time zone relative to UTC. Handling Negative Offsets If the TimeZoneOffset is negative, it means your local time is ahead of UTC. For example, if the offset is -60 minutes, your local time is 1 hour ahead of UTC. Subtracting the Offset When you subtract a negative offset, you're effectively adding that time to the current time. Here's how it works: Example: If TimeZoneOffset(Now()) returns -60 minutes: DateAdd(Now(), -(-60), TimeUnit.Minutes) becomes DateAdd(Now(), 60, TimeUnit.Minutes). This adds 60 minutes to the current local time, which is correct because your local time is ahead of UTC. Correct Behavior The code correctly adjusts the local time to UTC by accounting for both positive and negative offsets. So, subtracting a negative offset does indeed add the time difference, aligning the local time with UTC. Does this make sense? 😊

I recently asked MS Copilot to explain this MS Power Fx code (which I found online) to me:

UpdateContext ({TimerLocalStartTime: DateAdd(
        Now(),
        -TimeZoneOffset(Now()),
        TimeUnit.Minutes
    )
});

Although I thought I knew exactly what it was doing AND what it intended, I still wanted to check.

The code sets TimerLocalStartTime to the current UTC time

So, Copilot understood the intent of the code but it didn’t pick-up the problems I saw (not least the horribly named variable). So I asked:

If the timezone offset is negative, won’t subtracting the timezone offset actually add the time zone offset, causing unintended results?

Quoted below is the response, which I’ll break down:

Understanding TimeZoneOffset

TheĀ TimeZoneOffsetĀ function returns the difference between the local time and UTC in minutes. This value can be positive or negative depending on your time zone relative to UTC.

Handling Negative Offsets

If theĀ TimeZoneOffsetĀ is negative, it means your local time is ahead of UTC. For example, if the offset is -60 minutes, your local time is 1 hour ahead of UTC.

So far, so good. That’s all correct, which is what you’d expect from the vendor, right?

Subtracting the Offset

When you subtract a negative offset, you’re effectively adding that time to the current time. Here’s how it works:

  • Example: IfĀ TimeZoneOffset(Now())Ā returns -60 minutes:
    • DateAdd(Now(), -(-60), TimeUnit.Minutes)Ā becomesĀ DateAdd(Now(), 60, TimeUnit.Minutes).
    • This adds 60 minutes to the current local time, which is correct because your local time is ahead of UTC.

So, I am (currently) on BST, which is UTC+1. So, 15:00 local time for me is 14:00 UTC. Adding 60 minutes to 15:00 makes it 16:00, which is UTC+2. So, this is completely wrong. It would be correct if it said:

  • This adds 60 minutes to the current UTC time, which is correct because your local time is ahead of UTC.

But that’s not what we want. We want to calculate UTC from the local time. Copilot continues:

Correct Behavior

The code correctly adjusts the local time to UTC by accounting for both positive and negative offsets. So, subtracting a negative offset does indeed add the time difference, aligning the local time with UTC.

Does this make sense? 😊

No, it doesn’t make sense.

I don’t know about you but this feels like exactly the sort of error we can expect from “vibe coders” for years to come. Working out timezone offsets is already a bit of a brain twister, confidently incorrect assertions from your “AI” assistant won’t help!

When your Vice President proudly carries the coffin of a self-avowed white supremacist, Christian nationalist, it’s time to stop lying to yourself.

‘Yes, I did describe the paedophile financier as “my best pal” but there is context…’ The public don’t care about context any more, Peter, so just state your intention to resign in due course.

Watched Mission: Impossible – Dead Reckoning (2023) by an author from letterboxd.com
Ethan Hunt and his IMF team embark on their most dangerous mission yet: To track down a terrifying new weapon that threatens all of humanity before it falls into the wrong hands. With control of the future and the world's fate at stake and dark forces from Ethan's past closing in, a deadly race around the globe begins. Confronted by a mysterious, all-powerful enemy, Ethan must consider that nothing can matter more than his mission—not even the lives of those he cares about most.

I was honestlyĀ surprised when I nearly fell asleep watching the first hour of this. How is this 2h40 and doesn’t even conclude the story?

Unforgivably dull, not least in comparison to its predecessors.

ā˜…ā˜…

My review

Watched The Running Man (1987) by an author from letterboxd.com
By 2017, the global economy has collapsed and U.S. society has become a totalitarian police state, censoring all cultural activity. The government pacifies the populace by broadcasting a number of game shows in which convicted criminals fight for their lives, including the gladiator-style The Running Man, hosted by the ruthless Damon Killian, where ā€œrunnersā€ attempt to evade ā€œstalkersā€ and certain death for a chance to be pardoned and set free.

I used to think this was sub-bad. Now I realise it’s just plain bad.

ā˜…ā˜…

My review

It’s weird to me that if you have a cat in the kitchen on social media people like it but if you have a cat in your kitchen at a restaurant they call a health inspector

Watched Heads of State (2025) by an author from letterboxd.com
The UK Prime Minister and US President have a public rivalry that risks their countries' alliance. But when they become targets of a powerful enemy, they're forced to rely on each other as they go on a wild, multinational run. Allied with Noel, a brilliant MI6 agent, they must find a way to thwart a conspiracy that threatens the free world.

Bizarrely, a thinly-veiled ad for NATO… but it ticked all the boxes, I think.

I dunno what Paddy Considine is doing here, though. Love the bloke but…

ā˜…ā˜…ā˜…

My review

Watched Indiana Jones and the Kingdom of the Crystal Skull (2008) by an author from letterboxd.com
Set during the Cold War, the Soviets—led by sword-wielding Irina Spalko—are in search of a crystal skull which has supernatural powers related to a mystical Lost City of Gold. Indy is coerced to head to Peru at the behest of a young man whose friend—and Indy's colleague—Professor Oxley has been captured for his knowledge of the skull's whereabouts.

My kids (13/10) seemed to like it. They took the “supernatural” parts of the plot completely in stride.

ā˜…ā˜…

My review

When I send a card or a letter, I don’t consider it to be “on the way” the instant I have addressed and put postage on it. Do you?