State's datetime string is modified to UTC by checkpoint for no reason

I’ve stumbled upon an extremely weird issue here with states in

I have a continuous projection that captures a datetime string from
a category in its state. For example:




All the datetimes from
my stream are stored in +08 time zone.

For some weird reason,
after a checkpoint is made (or when the projection is disabled), the state’s
datetime string timezone is converted to UTC +00:




Notice how it also converts the actual hour as well as the timezone!

This baffles me because we’re just dealing with strings here … I
can’t imaging the projection engine converting all datetime strings to UTC by

My projection:




$init: function() {

    return {




function(state, event) {

    state.MyTime =




I can reproduce this in 5.0.1, 5.0.5, and 4.1.3 with the docker
image on my MacBook.

Reproduction Steps

  1. Start
    docker container

docker pull eventstore/eventstore

docker volume create testtimeeventstore-data"

docker volume create testtimeeventstore-log"

docker run --name testtime-eventstore -it -p 2113:2113 -p 1113:1113 --mount source=testtime-eventstore-data,target=/var/lib/eventstore --mount source=testtime-eventstore-log,target=/var/log/eventstore eventstore/eventstore

  1. Create
    20,000 events with unique categories




each with unique timestamp in +08 timezone:




I have a handy powershell script here that does it:

(1…20000) | %{ Invoke-WebRequest -Uri (“http://localhost:2113/streams/testdatestream” + $)
-Headers @{ “Content-Type” = “application/json”; “ES-EventType” = “TimeChanged”; “ES-EventId” =
[System.Guid]::NewGuid().ToString(); }
-Body ("{ "MyTime“: `”" +

  • “`” }") -Method Post }
  1. Create the
    projection (see above projection snippet)

  2. Start the projection and
    check the state for testdatestream-1. ** Notice the datetime string is in +08
    time zone.**

  1. After a few
    checkpoints have past, the datetime string is UPDATED to UTC +00 timezone!
    (remember there’s only one event per stream in the category)

Why would a checkpoint update my state for no reason? Especially when it’s
just a datetime string?


Hi Stephen,

Thanks for reporting this. Would you mind opening up an issue on the Event Store github for this?

Sure thing.

Here it is:


Thanks for the great reproduction!