diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/type/DateTimeEncoding.java b/presto-spi/src/main/java/com/facebook/presto/spi/type/DateTimeEncoding.java
index <HASH>..<HASH> 100644
--- a/presto-spi/src/main/java/com/facebook/presto/spi/type/DateTimeEncoding.java
+++ b/presto-spi/src/main/java/com/facebook/presto/spi/type/DateTimeEncoding.java
@@ -59,6 +59,6 @@ public final class DateTimeEncoding
 
     public static long updateMillisUtc(long newMillsUtc, long dateTimeWithTimeZone)
     {
-        return pack(newMillsUtc, (short) (dateTimeWithTimeZone & 0xFFF));
+        return pack(newMillsUtc, (short) (dateTimeWithTimeZone & TIME_ZONE_MASK));
     }
 }
Use named constant for time zone mask in DateTimeEncoding