Skip to content

Commit 2066e3f

Browse files
bouktejasmanohar
authored andcommitted
Use 24-hour format for timestamp (#6)
1 parent 18d51f3 commit 2066e3f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

db_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ func TestQuery(t *testing.T) {
5757
StringType: "another string",
5858
TimestampType: athenaTimestamp(time.Date(2017, 12, 3, 1, 11, 12, 0, time.UTC)),
5959
},
60+
{
61+
SmallintType: 9,
62+
IntType: 8,
63+
BigintType: 0,
64+
BooleanType: false,
65+
DoubleType: 1.235,
66+
StringType: "another string",
67+
TimestampType: athenaTimestamp(time.Date(2017, 12, 3, 20, 11, 12, 0, time.UTC)),
68+
},
6069
}
6170
expectedTypeNames := []string{"varchar", "smallint", "integer", "bigint", "boolean", "double", "varchar", "timestamp"}
6271
harness.uploadData(expected)

value.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
const (
1313
// TimestampLayout is the Go time layout string for an Athena `timestamp`.
14-
TimestampLayout = "2006-01-02 03:04:05.999"
14+
TimestampLayout = "2006-01-02 15:04:05.999"
1515
)
1616

1717
func convertRow(columns []*athena.ColumnInfo, in []*athena.Datum, ret []driver.Value) error {

0 commit comments

Comments
 (0)