You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 05e8fb4
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: packages/sync-mysql/src/schema/ddl.ts
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -86,13 +86,16 @@ export function iso8601Expression(v: string): string {
86
86
// `+05:30` means the wall time is 5h30 ahead of UTC, so UTC is that much earlier.
87
87
// `signed`, not `unsigned`: MySQL refuses to multiply an unsigned value by -1.
88
88
constoffsetMinutes=`(case when ${offset} is null then 0 else (case when left(${offset}, 1) = '-' then 1 else -1 end) * (cast(substring(${offset}, 2, 2) as signed) * 60 + cast(right(${offset}, 2) as signed)) end)`
89
+
// An offset is hours and minutes too; `+00:99` names no zone.
90
+
constoffsetOutOfRange=`(${offset} is not null and (cast(substring(${offset}, 2, 2) as unsigned) > 23 or cast(right(${offset}, 2) as unsigned) > 59))`
0 commit comments