Skip to content

Commit

Permalink
full str
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmcdonald3 committed Aug 9, 2024
1 parent 7e84e50 commit 75f1ddb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package software.amazon.polymorph;

public class CodegenConstants {
public static String DAFNY_DATETIME_STRING_FORMAT = "%Y-%m-%dT%H:%M:%S";
public static String DAFNY_DATETIME_STRING_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ";
}
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ public String enumShape(EnumShape shape) {
@Override
public String timestampShape(TimestampShape shape) {
writer.addStdlibImport("_dafny");
return "_dafny.Seq(%1$s.strftime(\"%2$s\"))".formatted(
writer.addStdlibImport("datetime", "timezone");
return "_dafny.Seq(%1$s.astimezone(timezone.utc).strftime(\"%2$s\"))".formatted(
dataSource,
DAFNY_DATETIME_STRING_FORMAT
);
Expand Down

0 comments on commit 75f1ddb

Please sign in to comment.