Skip to content

When I get the value of the completion column of a table with a deadline in a server script, I get a date that is one day later

Answer

This is by design. When the Editor Format of the Completion column is "Date", you get the date of the day after the date you entered, converted to UTC. When it is "Date and Time (Minutes)" or "Date and Time (Seconds)", you get the date and time you entered, converted to UTC.

Overview

When the Editor Format of the Completion column is "Date", the day after the date you entered is stored in the database. The values stored in the database are as follows.

Editor Format Completion Start Time, Date
Date The day after the date entered on the screen The date entered on the screen
Date and Time (Minutes) The date and time entered on the screen The date and time entered on the screen
Date and Time (Seconds) The date and time entered on the screen The date and time entered on the screen

A server script gets the value stored in the database and then returns it converted to UTC (Coordinated Universal Time), so when the editor format is "Date" the result can be the date of the day after the value entered on the screen.