Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:cronjob timezone #3948

Merged
merged 1 commit into from
Sep 18, 2023
Merged

feat:cronjob timezone #3948

merged 1 commit into from
Sep 18, 2023

Conversation

zjy365
Copy link
Contributor

@zjy365 zjy365 commented Sep 18, 2023

πŸ€– Generated by Copilot at 7c50e38

Summary

πŸ•’πŸ“πŸ—“οΈ

Added time zone support for cron jobs in the frontend. This involved adding a type annotation for job metadata, importing a utility function to convert JSON to YAML, and defining a function to get the user's time zone.

Oh we're the coders of the sea, and we work with skill and speed
We use getUserTimeZone to set the cron job right
We type annotate our data, and we import from tools
And we heave away, me hearties, heave away on three

Walkthrough

  • Import CronJobAnnotations type from @/types/job and cast job.metadata?.annotations to it in adapt.ts (link,link)
  • Add timeZone property to cronJob.spec object in json2Yaml.ts using the value of getUserTimeZone() function call (link,link,link)
  • Define getUserTimeZone function in tools.ts to return the user's time zone using the Intl.DateTimeFormat API (link)

Signed-off-by: jingyang <3161362058@qq.com>
@sealos-ci-robot
Copy link
Member

πŸ€– Generated by lychee action

Summary

Status Count
πŸ” Total 932
βœ… Successful 392
⏳ Timeouts 0
πŸ”€ Redirected 0
πŸ‘» Excluded 539
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Patch has no changes to coverable lines.

πŸ“’ Thoughts on this report? Let us know!.

@c121914yu c121914yu merged commit 3c5445c into labring:main Sep 18, 2023
28 of 29 checks passed
bxy4543 pushed a commit to bxy4543/sealos that referenced this pull request Oct 13, 2023
Signed-off-by: jingyang <3161362058@qq.com>
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.

None yet

3 participants