Skip to content

Add timezone-safe date handling for mobile API#3200

Merged
gloriafolaron merged 12 commits intomasterfrom
feature/mobile-timezone-fix
Jan 12, 2026
Merged

Add timezone-safe date handling for mobile API#3200
gloriafolaron merged 12 commits intomasterfrom
feature/mobile-timezone-fix

Conversation

@gloriafolaron
Copy link
Contributor

Summary

  • Add dateString parameter for mobile/API time entry submission
  • Use user's stored timezone preference instead of session timezone
  • Add getUserTimezone() helper to fetch timezone from user settings
  • Add stopActiveTimer() method for mobile timer functionality
  • Support dateString, timestamp, and date formats for flexibility

This ensures mobile time entries use the same timezone as the web app, preventing the "different timezone" warning and allowing entries to be editable in the web UI.

Test plan

  • Create time entry from mobile app
  • Verify no timezone warning appears in web UI
  • Verify entry is editable in web UI
  • Test with users in different timezones

🤖 Generated with Claude Code

Gloria Folaron and others added 2 commits January 11, 2026 17:12
- Add dateString parameter for mobile/API time entry submission
- Use user's stored timezone preference instead of session timezone
- Add getUserTimezone() helper to fetch timezone from user settings
- Support timestamp, dateString, and date formats for flexibility

This ensures mobile time entries use the same timezone as the web app,
preventing the "different timezone" warning and allowing entries to be
editable in the web UI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add dateString parameter for parsing dates in user's stored timezone
- Add getUserTimezone() helper to fetch timezone from settings
- Add stopActiveTimer() method for mobile timer functionality
- Support dateString in both logTime() and upsertTime() methods

This ensures mobile time entries don't trigger timezone warnings
in the web UI and remain editable.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gloriafolaron gloriafolaron requested a review from a team as a code owner January 11, 2026 22:13
@CLAassistant
Copy link

CLAassistant commented Jan 11, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Add migration 30411 to add 'color' column to zp_canvas table
for storing notebook color preferences. Default value is 'ocean'.

This supports the Notes plugin color picker feature for both
web and mobile app synchronization.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gloriafolaron
Copy link
Contributor Author

@marcelfolaron Added database migration (30411) for notebook color column in zp_canvas table - this supports the Notes plugin color picker feature from PR Leantime/plugins#31.

gloriafolaron and others added 9 commits January 11, 2026 18:24
Introduces a `color` column with a default value of 'ocean' to the tasks table definition in the Install repository. This allows tasks to have an associated color attribute.
Removed the dependency on SettingService and the getUserTimezone method from the Timesheets service. Date parsing for 'dateString' now uses dtHelper()->parseUserDateTime for consistency and simplification.
Updated the dbVersion property in AppSettings to reflect the new database version 3.4.11.
Introduced new language entries for the Notes plugin to support filtering, sorting, and additional actions such as duplicate, share, export, and download options.
- Add getTicketPlanHours() to Timesheets repository for getRemainingHours API
- Fix code style issues flagged by pint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add missing PDO use statement for getTicketPlanHours method.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Both FileManagerTest and TicketsServiceTest use dtHelper() which requires
session values for timezone, language, and date/time formats. Added session
setup in setUp() methods to ensure dtHelper initializes correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The tests use dtHelper() which requires Environment and Language classes
to be properly bound in the container. Added:
- Environment mock with defaultTimezone and language properties
- Language mock with __() method returning date/time formats
- CarbonMacros registration for proper date parsing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gloriafolaron gloriafolaron merged commit 8497240 into master Jan 12, 2026
4 of 6 checks passed
@gloriafolaron gloriafolaron deleted the feature/mobile-timezone-fix branch January 12, 2026 01:25
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