diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2019-01-08 15:17:06 -0500 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2019-02-17 18:33:19 +0100 |
commit | a50bff3c0fc55c39efe6fe036adee91081e80b45 (patch) | |
tree | 315664e863a8cba36f28e5fd96e557ccf0a12105 | |
parent | b8f8f03ecf90fdd212801caa7310d58e0e454fce (diff) | |
download | couchdb-a50bff3c0fc55c39efe6fe036adee91081e80b45.tar.gz |
Fix end_time field in /_replicate response
Previously `end_time` was generated converting the start_time to universal,
then passing that to `httpd_util:rfc1123_date/1`. However, `rfc1123_date/1`
also transates its argument from local to UTC time, that is it accepts input to
be in local time format.
Fixes #1841
-rw-r--r-- | src/couch_replicator/src/couch_replicator_scheduler_job.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couch_replicator/src/couch_replicator_scheduler_job.erl b/src/couch_replicator/src/couch_replicator_scheduler_job.erl index f669d464d..412ff7d05 100644 --- a/src/couch_replicator/src/couch_replicator_scheduler_job.erl +++ b/src/couch_replicator/src/couch_replicator_scheduler_job.erl @@ -735,8 +735,8 @@ do_checkpoint(State) -> {SrcInstanceStartTime, TgtInstanceStartTime} -> couch_log:notice("recording a checkpoint for `~s` -> `~s` at source update_seq ~p", [SourceName, TargetName, NewSeq]), - UniversalStartTime = calendar:now_to_universal_time(ReplicationStartTime), - StartTime = ?l2b(httpd_util:rfc1123_date(UniversalStartTime)), + LocalStartTime = calendar:now_to_local_time(ReplicationStartTime), + StartTime = ?l2b(httpd_util:rfc1123_date(LocalStartTime)), EndTime = ?l2b(httpd_util:rfc1123_date()), NewHistoryEntry = {[ {<<"session_id">>, SessionId}, |