MCPcopy Index your code
hub / github.com/coder/coder / extractTimezone

Function extractTimezone

site/src/utils/schedule.tsx:45–55  ·  view source on GitHub ↗
(
	raw: string,
	defaultTZ = DEFAULT_TIMEZONE,
)

Source from the content-addressed store, hash-verified

43 * specified; otherwise the specified defaultTZ
44 */
45export const extractTimezone = (
46 raw: string,
47 defaultTZ = DEFAULT_TIMEZONE,
48): string => {
49 const matches = raw.match(/CRON_TZ=\S*\s/g);
50
51 if (matches && matches.length > 0) {
52 return matches[0].replace(/CRON_TZ=/, "").trim();
53 }
54 return defaultTZ;
55};
56
57export const autostartDisplay = (schedule: string | undefined): string => {
58 if (schedule) {

Callers 2

schedule.test.tsFile · 0.90
transformScheduleFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected