Skip to content

Parse negative Unix timestamp strings in the date filter - #2119

Closed
Shubham-Padkonde wants to merge 1 commit into
Shopify:mainfrom
Shubham-Padkonde:fix/negative-unix-timestamp-strings
Closed

Shubham-Padkonde wants to merge 1 commit into
Shopify:mainfrom
Shubham-Padkonde:fix/negative-unix-timestamp-strings

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

The date filter accepts negative integer Unix timestamps but leaves equivalent strings unchanged. For example, in UTC, -1 formats as 12/31/1969 while "-1" remains "-1". This affects timestamps for dates before 1970 received as strings.

Allow an optional minus sign in the Unix timestamp pattern. Add filter and template rendering regressions, including a timestamp for 1900.

Validation: the new regression fails on the base revision. bundle exec rake passes on Ruby 3.3.6: the full 1,041-test suite and 788-test integration suite each pass in lax, strict, and strict2 modes. RuboCop checks 158 files with no offenses.

Prepared with Codex assistance.

@Shubham-Padkonde
Shubham-Padkonde deleted the fix/negative-unix-timestamp-strings branch September 16, 2026 08:54
@Shubham-Padkonde
Shubham-Padkonde restored the fix/negative-unix-timestamp-strings branch September 16, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant