Go to start of month -> last day of the month before

Value processing to “start of month” for march gives 02.28.23-00.
Value processing to “start of month” for april gives 03.31.22-00.

Is this intentional, a bug or a missing datetime setting in the environment I am in? :slight_smile:


I think this is simply due to switching to daylight saving time! The datetimes are given in GMT, so until March 26 we were one hour ahead of GMT, but now we are two hours ahead.

So given that your timezone is set to Norway, 02.28.23-00 would return 03.01.00-00 in local time, and 03.31.22-00 would return 04.01.00-00 in local time.

So it is intentional, in that case im kind of dependent on making this show local time as it is important for the service logic. The service timezone is set to europe/oslo.

Do you have a suggestion on how to make start of month set start of this month in the local time zone? :slight_smile:

If you set a datetime to “start of month” it should return start of this month in the local time zone. All datetime objects in Appfarm are stored in UTC/GMT, but are converted automatically to correspond with the timezone set in the app or service in question. You can read more about date and time in our Documentation.

Are the datetime objects not behaving according to the description in the Docs? If so, where are you performing the value processing and where is the datetime returned with an unexpected value?

It works like the documentation, (sorry for not checking). I guess that this is so standard that most other systems are expected to also run on UTC? Then this is not a problem at all :slight_smile:

No worries! :blush:

Shouldn’t be a problem, but of course depends on the setup of the other system.

1 Like