# Date/Time node issue

**URL:** <https://forums.losant.com/t/date-time-node-issue/4659>\
**Category:** Bug Report\
**Tags:** workflow\
**Created:** [July 24, 2022, 10:00pm UTC](https://forums.losant.com/t/date-time-node-issue/4659 "2022-07-24T22:00:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sreyams\_Jain](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@Sreyams\_Jain](https://forums.losant.com/u/Sreyams_Jain)\
**Post date:** [July 24, 2022, 10:00pm UTC](https://forums.losant.com/t/date-time-node-issue/4659/1 "2022-07-24T22:00:18Z")

</div>

I am trying to use date/time node in workflow to get previous date by using subtract time operation of 1 Day. Source date format DD/MM/YYYY and expecting previous Date in DD/MM/YYY format. I am not seeing the correct previous date.

example:  
source date 01/03/2024  
previous date 28/02/2024

was expecting previous date as 29/02/2024

Any issue here?

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [July 25, 2022, 2:00pm UTC](https://forums.losant.com/t/date-time-node-issue/4659/2 "2022-07-25T14:00:12Z")

</div>

If I set my time zone to “UTC” in the node, I do get the expected behavior (01/03/2024 minus one day gives 29/02/2024), but if I set it to “America/New York”, I see what you are talking about - I get 28/02/2024.

However, it’s not a leap-year-specific problem; if I subtract one day from 04/03/2024 with a time zone of “America/New York”, I get 02/03/2024.

I’m looking into this further. Thanks for bringing it to our attention.

---

<div class="post-metadata">

**Author:** ![Sreyams\_Jain](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@Sreyams\_Jain](https://forums.losant.com/u/Sreyams_Jain)\
**Post date:** [July 25, 2022, 2:16pm UTC](https://forums.losant.com/t/date-time-node-issue/4659/3 "2022-07-25T14:16:59Z")

</div>

If it is a 1 day operation, time zone shouldn’t matter at all. Is it not?

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [July 25, 2022, 4:00pm UTC](https://forums.losant.com/t/date-time-node-issue/4659/4 "2022-07-25T16:00:30Z")

</div>

I talked with our engineering team and here’s what’s going on:

When setting the Timezone property in the node, you are setting the timezone of the **output** , not the input date. Note that you can define the timezone of the input date by appending it to the value you provide (i.e. “2024-03-01T00:00:00Z-04:00”). If no timezone is provided in the input, the input is assumed to be UTC.

So, when you provide an input of “01/03/2024”, that is resolving to “2024-03-01T00:00:00Z” (UTC).

Subtract one day and you get “2024-02-29T00:00:00Z” (UTC).

But if you set a time zone of, say, “America/New York”, that then becomes “2024-02-28T19:00:00Z-05:00”.

And your output format is “DD/MM/YYYY”, so what you’re left with is just “2024-02-28”.

Hopefully that makes sense. I’ve filed a ticket to clarify this behavior in the node’s editor as it confused me as well. Thanks for bringing this to our attention.
