Skip to content

10AM–5PM by appt.
24h urgent appts

📞 0279-088880

All prices include GST

Cart
0 items

Computer Repair Guides

Change a Power Query Zoned Timestamp’s Offset Without Changing Its Instant

by AEPC / AKL East PC 28 Sep 2026

Two clock readings on different dates can describe the same event. When importing logs, changing the offset should preserve that instant unless the task is explicitly to correct an incorrectly recorded time. Keep those two operations separate.

DateTimeZone.SwitchZone takes a datetimezone value and a new offset in hours, with optional minutes. Microsoft documents an error when the input has no timezone component. Use a typed zoned value; do not remove its offset first and then assume the remaining clock reading still identifies the same instant.

Make the date boundary visible

In a separate Power Query practice expression, use this fictional timestamp: 1 January 2026 at 00:30 with an explicit offset of +13:00. Convert it to offset zero:

DateTimeZone.SwitchZone(#datetimezone(2026, 1, 1, 0, 30, 0, 13, 0), 0)

The expected result is 31 December 2025 at 11:30 with offset +00:00. Subtracting thirteen hours crosses both midnight and the year boundary. Compare the full year, month, day, hour and offset rather than accepting a time-of-day match alone.

Convert that result back to +13:00 and compare it with the original zoned timestamp. The round trip should restore 1 January at 00:30. A result that keeps the original clock reading while merely relabelling its offset would describe a different instant.

Keep missing zone information unresolved

Try the separate unzoned value #datetime(2026, 1, 1, 0, 30, 0) as the input to SwitchZone and observe the documented error. Do not silently supply whichever zone your current computer uses. Obtain the source system's timestamp convention before deciding how an unzoned value should be interpreted.

The function's arguments specify numeric offsets, not a named region or its daylight-saving rule history. The +13:00 example is an explicit fixture, not a claim that a particular city always uses that offset. If the source requires regional rules, resolve the correct offset for each relevant date through an appropriate documented process.

Retain the original timestamp and its convention with the converted output. Acceptance means the two representations identify the same instant, including across a date boundary, and missing zone information has not been disguised as a successful conversion.

Sources: Microsoft: DateTimeZone.SwitchZone.

Prev Post
Next Post

Thanks for subscribing!

This email has been registered!

Shop the look

Choose Options

Edit Option
Terms & Conditions
Unless otherwise stated, brand new accessories are guaranteed for one year. Second-hand parts are guaranteed for three months. Repair (hardware) is guaranteed for one month. The software is not covered by the warranty, you should contact the software development organization for technical support and after-sales service. The warranty is limited to the same position fault; the customer should provide the warranty with the complete Warranty sticker and the receipt of payment. Otherwise, it will not be guaranteed. (If the warranty label is damaged for any reason, is not covered by warranty.) We have a 7-day RTB return policy, which means you have 7 days after receiving your item to request a return. The return handling fee is 25 percent of the total amount. To be eligible for a return, your item must be in the same condition that you received it, unworn or unused, with tags, and in its original packaging. You’ll also need the receipt or proof of purchase. To start a return, you can contact us at akleastpc@gmail.com.  Items sent back to us without first requesting a return will not be accepted. You can always contact us for any return question at akleastpc@gmail.com. Damages and issues Please inspect your order upon reception and contact us immediately if the item is defective, damaged or if you receive the wrong item, so that we can evaluate the issue and make it right. Exceptions / non-returnable items Certain types of items cannot be returned, like perishable goods (such as food, flowers, or plants), custom products (such as special orders or personalized items), and personal care goods (such as beauty products). We also do not accept returns for hazardous materials, flammable liquids, or gases. Please get in touch if you have questions or concerns about your specific item. Unfortunately, we cannot accept returns on sale items or gift cards. Exchanges The fastest way to ensure you get what you want is to return the item you have, and once the return is accepted, make a separate purchase for the new item. Refunds We will notify you once we’ve received and inspected your return, and let you know if the refund was approved or not. If approved, you’ll be automatically refunded on your original payment method within 10 business days. Please remember it can take some time for your bank or credit card company to process and post the refund too. If more than 15 business days have passed since we’ve approved your return, please contact us at akleastpc@gmail.com.
this is just a warning
Login
Shopping Cart
0 items