( raw: string, defaultTZ = DEFAULT_TIMEZONE, )
| 43 | * specified; otherwise the specified defaultTZ |
| 44 | */ |
| 45 | export 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 | |
| 57 | export const autostartDisplay = (schedule: string | undefined): string => { |
| 58 | if (schedule) { |
no outgoing calls
no test coverage detected