Skip to content

Commit

Permalink
try to fix timezone issue
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-wang committed Oct 10, 2014
1 parent 17fda35 commit 0e3110e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,14 @@ class ExpressionEvaluationSuite extends FunSuite {
}

test("date casting") {
val millis = 15 * 1000 + 1
val d = new Date(millis)
val d = Date.valueOf("1970-01-01")
checkEvaluation(Cast(d, ShortType), null)
checkEvaluation(Cast(d, IntegerType), null)
checkEvaluation(Cast(d, LongType), null)
checkEvaluation(Cast(d, FloatType), null)
checkEvaluation(Cast(d, DoubleType), null)
checkEvaluation(Cast(d, StringType), "1970-01-01")
checkEvaluation(Cast(Cast(d, TimestampType), StringType), "1970-01-01 00:00:00")
}

test("timestamp casting") {
Expand Down

0 comments on commit 0e3110e

Please sign in to comment.