Skip to content

Commit

Permalink
convert dart to utc before serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmossas committed Jun 12, 2024
1 parent 7fe058f commit efc7796
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions languages/dart/dart-codegen/src/primitives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ export function dartDateTimeFromSchema(
},
toQueryString(input, target, key) {
if (context.isOptional) {
return `if (${input} != null) ${target}.add("${key}=\${${input}!.toIso8601String()}")`;
return `if (${input} != null) ${target}.add("${key}=\${${input}!.toUtc().toIso8601String()}")`;
}
if (schema.nullable) {
return `${target}.add("${key}=\${${input}?.toIso8601String()}")`;
return `${target}.add("${key}=\${${input}?.toUtc().toIso8601String()}")`;
}
return `${target}.add("${key}=\${${input}.toIso8601String()}")`;
return `${target}.add("${key}=\${${input}.toUtc().toIso8601String()}")`;
},
content: "",
};
Expand Down

0 comments on commit efc7796

Please sign in to comment.