Merge pull request #68 from monae/patch-timezone

Fix broken test which depends on local timezone
This commit is contained in:
Michael Bayne
2015-09-09 14:39:36 -07:00
@@ -14,6 +14,7 @@ import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.TimeZone;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
@@ -384,6 +385,9 @@ public class MustacheTest
else return String.valueOf(value);
}
protected SimpleDateFormat _fmt = new SimpleDateFormat("yyyy/MM/dd");
{
_fmt.setTimeZone(TimeZone.getTimeZone("UTC"));
}
};
check("Date: 2014/01/08", Mustache.compiler().withFormatter(fmt).
compile("{{msg}}: {{today}}").execute(new Object() {