Strange behavior in Date time in user input


I am attempting to customize my date time formula to display the date before the month instead of the default month first. However, every time I insert the formula in the user input section, the default date appears to be 1970, which seems odd. When I remove the formula, the current date appears again.

I want the user input box to show the current date by default.

Is there a solution to this issue?

The distinction that one needs to grasp here is between two different types of value:

  1. A machine-readable date value, which, behind the scenes is an integer – a number of seconds since the UTC pop of champagne corks at the start of Jan 1 1970
  2. A human-readable calendar string value which represents a date according to some local calendrical convention or other, but is not necessarily unambiguous to a machine.

An %ICUDateTime% token returns a human readable calendar string (not a machine-readable unix epoch integer). As its numeric value is zero, it corresponds to the start of the Unix epoch, on Jan 1 1970.

As you need a numeric value in that field, you could either leave it blank, or use a numeric calculation function like NOW()

but you can't specify an actual time (in a calculation field) with a calendar string which doesn't correspond to the display format specified in your system preferences.

As for the calendrical display format that is used once you have supplied a default or custom number of Unix Epoch seconds, I think Keyboard Maestro is probably just using which ever preference you have set for Date Time display formats in System Settings > Language and Region and you could change it there.

1 Like