Skip to content

Commit 43d4bfb

Browse files
authored
avoid octal 0 in protocol test (#1098)
1 parent 6bada37 commit 43d4bfb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,9 +1229,9 @@ public Void nullNode(NullNode node) {
12291229
@Override
12301230
public Void numberNode(NumberNode node) {
12311231
// Handle timestamps needing to be converted from numbers to their input type of Date.
1232-
// Also handle that a Date in TS takes milliseconds, so add 000 to the end.
1232+
// Also handle that a Date in TS takes milliseconds, so add * 1000 to the end.
12331233
if (workingShape.isTimestampShape()) {
1234-
writer.write("new Date($L000),", node.getValue());
1234+
writer.write("new Date($L * 1000),", node.getValue());
12351235
} else {
12361236
writer.write("$L,", node.getValue().toString());
12371237
}

0 commit comments

Comments
 (0)