Exemplo n.º 1
0
        public void ToLocalTimeDefaults() {
            var now = DateTime.UtcNow;
            var local = DateTime.Now;

            var input = new RowsBuilder().Row("time", now).ToOperation();
            var transform = new ToLocalTimeOperation("time", "time", "", "");
            var output = TestOperation(input, transform);
            Assert.AreEqual(local, output[0]["time"], "Change to your time zone to get this to pass.");
        }
Exemplo n.º 2
0
        public void ToLocalTime() {
            var now = DateTime.UtcNow;
            var local = DateTime.Now;

            var input = new RowsBuilder().Row("time", now).ToOperation();
            var transform = new ToLocalTimeOperation("time", "time", "UTC", "Eastern Standard Time");
            var output = TestOperation(input, transform);
            Assert.AreEqual(local.ToString(), output[0]["time"].ToString(), "Change to your time zone to get this to pass.");
        }