Skip to content

Conversation

Copy link

Copilot AI commented Jan 28, 2026

Tests asserting exact timestamp values (e.g., AttributeSpec#shows all the attributes in the component casing) fail on local installations with non-UTC timezones. Migration files inserted timestamps as string literals, which databases interpret according to session timezone settings.

Changes

  • 11 migration files: Replaced timestamp string literals with createDateTime() calls

Before:

"created_date": "2017-07-28 02:06:36",
"modified_date": "2017-07-28 02:06:36"

After:

"created_date": createDateTime( 2017, 07, 28, 02, 06, 36 ),
"modified_date": createDateTime( 2017, 07, 28, 02, 06, 36 )

createDateTime() produces CFML datetime objects in the application timezone (UTC per Application.cfc), ensuring consistent storage/retrieval regardless of server locale. Existing configuration (this.timezone = "UTC", serverTimezone=UTC, convertToTimezone = "UTC") already establishes UTC throughout the stack.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: elpete <2583646+elpete@users.noreply.github.com>
Copilot AI changed the title [WIP] Update migrations and settings for consistent timestamp handling Fix timezone-dependent test failures in timestamp assertions Jan 28, 2026
Copilot AI requested a review from elpete January 28, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants