Skip to content

feat: use relative-time element for PR timestamp localization#176

Merged
Paveltarno merged 1 commit intomainfrom
fix/issue-175-pr-timestamp-localization
Feb 2, 2026
Merged

feat: use relative-time element for PR timestamp localization#176
Paveltarno merged 1 commit intomainfrom
fix/issue-175-pr-timestamp-localization

Conversation

@Paveltarno
Copy link
Contributor

Summary

Implements timestamp localization for auto-generated PR descriptions using GitHub's <relative-time> web component. This replaces the static UTC timestamps with dynamically localized times that automatically adjust to each viewer's timezone.

Changes Made

  • Updated .github/workflows/pr-description.yml line 81
  • Changed timestamp instruction from YYYY-MM-DD HH:MM UTC format to ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ)
  • Wrapped timestamp placeholder in <relative-time datetime="..."></relative-time> HTML element

Benefits

  • ✨ Automatic timezone localization for all viewers
  • 🕐 Shows relative time ("2 hours ago", "just now", etc.)
  • 🖱️ Hover displays exact localized datetime
  • 🌍 Better UX for global teams
  • 🚀 No backend logic needed - handled client-side by GitHub

Example Output

What viewers will see:

  • "2 hours ago" (or "just now", "5 minutes ago", etc.)

On hover:

  • Exact time in their local timezone (e.g., "Feb 2, 2026, 3:49 AM PST")

Testing

Next PR that triggers the auto-description workflow will use this new format. The <relative-time> element is a standard GitHub web component that works across PR descriptions, comments, and issues.

Fixes #175

🤖 Generated with Claude Code

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.26-pr.176.484be29

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.0.26-pr.176.484be29"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.26-pr.176.484be29"
  }
}

Preview published to npm registry — try new features instantly!

@claude
Copy link

claude bot commented Feb 2, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Update PR description workflow to use GitHub's <relative-time> element
instead of static UTC timestamps. This provides automatic timezone
localization for all viewers.

Changes:
- Update timestamp format from "YYYY-MM-DD HH:MM UTC" to ISO 8601
- Wrap timestamp in <relative-time> HTML element
- Viewers now see relative time ("2 hours ago") with exact localized
  time on hover

Fixes #175

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@Paveltarno Paveltarno force-pushed the fix/issue-175-pr-timestamp-localization branch from f48cacf to 96c15a4 Compare February 2, 2026 12:21
@Paveltarno Paveltarno merged commit dff19e7 into main Feb 2, 2026
5 of 6 checks passed
@Paveltarno Paveltarno deleted the fix/issue-175-pr-timestamp-localization branch February 2, 2026 12:22
@Paveltarno Paveltarno restored the fix/issue-175-pr-timestamp-localization branch February 2, 2026 12:43
Paveltarno added a commit that referenced this pull request Feb 2, 2026
Paveltarno added a commit that referenced this pull request Feb 2, 2026
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.

adjust PR description timestamp

1 participant