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

Changed seconds schedule to UTC timezone #180

Merged
merged 1 commit into from
Mar 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const ScheduleNode = (props) => {
</Typography>

<Typography fontSize={10} mt={1}>
{props.data.genericdata.timezone + ' ' + getTimeZoneOffSet(props.data.genericdata.timezone)}
{printTimezone(props.data.genericdata.timezone)}
</Typography>
</Grid>
</Tooltip>
Expand All @@ -99,3 +99,11 @@ const ScheduleNode = (props) => {
};

export default ScheduleNode;

// Utility function
function printTimezone(timezone) {
if (timezone === 'Etc/UTC') {
return 'UTC';
}
return timezone + ' ' + getTimeZoneOffSet(timezone);
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const ScheduleDrawer = ({ handleClose, setElements }) => {
genericdata: {
schedule: tabValue ? '*/' + seconds + ' * * * * *' : scheduleStatement,
scheduleType: tabValue ? 'cronseconds' : 'cron',
timezone: timezone,
timezone: tabValue ? 'Etc/UTC' : timezone,
},
};
}
Expand Down