(date, dateFormat, timeZone, is12Hour)
| 4251 | }; |
| 4252 | |
| 4253 | export function formatDateTime(date, dateFormat, timeZone, is12Hour) { |
| 4254 | const zonedDate = toZonedTime(date, timeZone); // Convert date to the given timezone |
| 4255 | const timeFormat = is12Hour ? "hh:mm:ss a" : "HH:mm:ss"; |
| 4256 | return dateFormat |
| 4257 | ? format( |
| 4258 | zonedDate, |
| 4259 | `${selectFormat(dateFormat)}, ${timeFormat} 'GMT' XXX`, |
| 4260 | { timeZone } |
| 4261 | ) |
| 4262 | : formatTimeInTimezone(date, timeZone); |
| 4263 | } |
| 4264 | |
| 4265 | export const updateDateWidgetsRes = ( |
| 4266 | documentData, |
no test coverage detected