emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* erroneous clocktable for November 2018 - possible DST problem
@ 2018-11-17  8:06 Jeff Trull
  2018-11-17 20:50 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Trull @ 2018-11-17  8:06 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 9988 bytes --]

Clocktables containing work in November of 2018 are reported incorrectly,
showing the wrong day (typically one earlier than the correct date). For
example, in the attached repro.org, work is performed on the 3rd and 5th of
November, but when daily reports are used in the clocktable the work on 5
November is reported as occurring on 4 November. Reporting 1-4 November and
5-30 November separately works around the problem.

In the US, Daylight Savings ended on 4 November; this fact plus a previous
problem (reported here:
https://stackoverflow.com/questions/42821604/why-is-emacs-org-mode-missing-one-date-from-clocktable)
suggests DST is involved.

Thanks and Regards,
Jeff Trull

Emacs  : GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.23.2)
 of 2018-08-27, modified by Debian
Package: Org mode version 9.1.14 (9.1.14-9-g131531-elpa @
/home/jet/.emacs.d/elpa/org-20181112/)

current state:
==============
(setq
 org-export-backends '(confluence md latex icalendar html ascii)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(closure
                                   (htmlize-buffer-places
org-html-format-table-no-css
                                    htmlize-css-name-prefix
htmlize-output-type htmlize-output-type
                                    htmlize-css-name-prefix t)
                                   (_name contents) contents)
 org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
 org-duration-format 'h:mm
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-format-headline-function
'org-latex-format-headline-default-function
 org-latex-listings-options '(("keywordstyle" "\\color{keywordcolor}")
                              ("basicstyle" "\\footnotesize\\ttfamily")
                              ("backgroundcolor" "\\color{backcolor}")
("showstringspaces" "false")
                              ("moredelim"

 "**[is][\\only<+>{\\color{black}\\lstset{style=highlight}}]{@}{@}")
                              ("breaklines" "true"))
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(closure (t) (_ contents) contents)
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-from-is-user-regexp "\\<Jeff Trull\\>"
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
                   [add-hook change-major-mode-hook org-show-block-all
append local] 5]
                 #[0 "\300\301\302\303\304$\207"
                   [add-hook change-major-mode-hook
org-babel-show-result-all append local] 5]
                 (closure
                  (org-inlinetask-min-level buffer-face-mode-face
org-struct-menu org-last-state
                   org-id-track-globally texmathp-why remember-data-file
                   org-agenda-tags-todo-honor-ignore-options
iswitchb-temp-buflist
                   calc-embedded-open-mode calc-embedded-open-formula
calc-embedded-close-formula
                   align-mode-rules-list ffap-url-regexp t)
                  nil
                  (add-hook (quote change-major-mode-hook) (quote
org-show-block-all)
                   (quote append) (quote local))
                  )
                 (closure (*this* org-babel-confirm-evaluate-answer-no t)
nil
                  (add-hook (quote change-major-mode-hook) (quote
org-babel-show-result-all)
                   (quote append) (quote local))
                  )
                 (closure
                  (org-inlinetask-min-level buffer-face-mode-face
org-mode-map org-tbl-menu
                   org-org-menu org-struct-menu org-entities org-last-state
org-id-track-globally
                   org-clock-start-time texmathp-why remember-data-file
                   org-agenda-tags-todo-honor-ignore-options
iswitchb-temp-buflist
                   calc-embedded-open-mode calc-embedded-open-formula
calc-embedded-close-formula
                   align-mode-rules-list org-emphasis-alist
org-emphasis-regexp-components
                   org-export-registered-backends org-modules
org-babel-load-languages
                   org-element-paragraph-separate ffap-url-regexp t)
                  nil
                  (add-hook (quote change-major-mode-hook) (quote
org-show-block-all)
                   (quote append) (quote local))
                  )
                 (closure
                  (org-bracket-link-regexp org-src-window-setup *this*
                   org-babel-confirm-evaluate-answer-no
org-src-preserve-indentation
                   org-src-lang-modes org-edit-src-content-indentation
org-babel-library-of-babel t)
                  nil
                  (add-hook (quote change-major-mode-hook) (quote
org-babel-show-result-all)
                   (quote append) (quote local))
                  )
                 org-babel-result-hide-spec org-babel-hide-all-hashes
org-eldoc-load)
 org-bibtex-headline-format-function '(closure
                                       (org-id-locations
org-agenda-search-view-always-boolean
                                        org-agenda-overriding-header t)
                                       (entry) (cdr (assq :title entry)))
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ascii-format-drawer-function '(closure (t) (_name contents _width)
contents)
 org-odt-format-inlinetask-function
'org-odt-format-inlinetask-default-function
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
                  org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
 org-html-creator-string "<a
href=\"https://www.gnu.org/software/emacs/\">Emacs</a>
25.2.2 (<a href=\"https://orgmode.org\">Org</a> mode 9.1.13)"
 org-latex-packages-alist '(("" "moresize" t) ("" "fancyvrb" t) (""
"inconsolata" t) ("" "tikz" t)
                            ("" "color" t) ("" "listings" t))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-odt-format-drawer-function '(closure
                                  (hfy-user-sheet-assoc
hfy-html-quote-regex hfy-html-quote-map
                                   hfy-face-to-css hfy-begin-span-handler
hfy-end-span-handler
                                   archive-zip-extract
nxml-auto-insert-xml-declaration-flag t)
                                  (_name contents) contents)
 org-latex-listings t
 org-html-format-headline-function
'org-html-format-headline-default-function
 org-link-parameters '(("id" :follow org-id-open)
                       ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
                       ("mhe" :follow org-mhe-open :store
org-mhe-store-link)
                       ("irc" :follow org-irc-visit :store
org-irc-store-link)
                       ("info" :follow org-info-open :export
org-info-export :store
                        org-info-store-link)
                       ("gnus" :follow org-gnus-open :store
org-gnus-store-link)
                       ("docview" :follow org-docview-open :export
org-docview-export :store
                        org-docview-store-link)
                       ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
                       ("bbdb" :follow org-bbdb-open :export
org-bbdb-export :complete
                        org-bbdb-complete-link :store org-bbdb-store-link)
                       ("w3m" :store org-w3m-store-link) ("file+sys")
("file+emacs")
                       ("ipynb" :follow ein:org-open :help-echo "Open
ipython notebook." :store
                        ein:org-store-link)
                       ("doi" :follow org--open-doi-link) ("elisp" :follow
org--open-elisp-link)
                       ("file" :complete org-file-complete-link)
                       ("ftp" :follow (lambda (path) (browse-url (concat
"ftp:" path))))
                       ("help" :follow org--open-help-link)
                       ("http" :follow (lambda (path) (browse-url (concat
"http:" path))))
                       ("https" :follow (lambda (path) (browse-url (concat
"https:" path))))
                       ("mailto" :follow (lambda (path) (browse-url (concat
"mailto:" path))))
                       ("news" :follow (lambda (path) (browse-url (concat
"news:" path))))
                       ("shell" :follow org--open-shell-link))
 org-structure-template-alist '(("n" "#+BEGIN_NOTES\n?\n#+END_NOTES")
                                ("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
                                ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE")
                                ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE")
                                ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE")
                                ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM")
                                ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER")
                                ("C" "#+BEGIN_COMMENT\n?\n#+END_COMMENT")
                                ("l" "#+BEGIN_EXPORT
latex\n?\n#+END_EXPORT") ("L" "#+LaTeX: ")
                                ("h" "#+BEGIN_EXPORT
html\n?\n#+END_EXPORT") ("H" "#+HTML: ")
                                ("a" "#+BEGIN_EXPORT
ascii\n?\n#+END_EXPORT") ("A" "#+ASCII: ")
                                ("i" "#+INDEX: ?") ("I" "#+INCLUDE: %file
?"))
 org-export-creator-string "Emacs 25.2.2 (Org mode 9.1.13)"
 org-reveal-title-slide "<h2>%t</h2><h2>%a</h2><h2>%d</h2>"
 org-html-format-inlinetask-function
'org-html-format-inlinetask-default-function
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )

[-- Attachment #1.2: Type: text/html, Size: 14129 bytes --]

[-- Attachment #2: repro.org --]
[-- Type: application/octet-stream, Size: 1726 bytes --]

#+TITLE: Reproducing clock table problem

* Task A
  :LOGBOOK:
  CLOCK: [2018-11-03 Sat 12:00]--[2018-11-03 Sat 14:00] =>  2:00
  - Work 
  CLOCK: [2018-11-05 Mon 12:00]--[2018-11-05 Mon 14:00] =>  2:00
  - More work 
  :END:
* Task B
  :LOGBOOK:
  CLOCK: [2018-11-03 Sat 14:00]--[2018-11-03 Sat 16:00] =>  2:00
  - Work 
  CLOCK: [2018-11-05 Mon 14:00]--[2018-11-05 Mon 16:00] =>  2:00
  - More work 
  :END:

** Wrong Clocktable
#+BEGIN: clocktable :scope file :maxlevel 4 :block 2018-11 :stepskip0 t :step day

Daily report: [2018-11-03 Sat]
| Headline     |   Time |
|--------------+--------|
| *Total time* | *4:00* |
|--------------+--------|
| Task A       |   2:00 |
| Task B       |   2:00 |

# This work happened on the 5th, not the 4th!
Daily report: [2018-11-04 Sun]
| Headline     |   Time |
|--------------+--------|
| *Total time* | *4:00* |
|--------------+--------|
| Task A       |   2:00 |
| Task B       |   2:00 |

#+END:

** Correct (but separate) Clocktables
# The November period, when broken up into two ranges, now looks correct:

#+BEGIN: clocktable :scope file :maxlevel 4 :tstart "<2018-11-01>" :tend "<2018-11-04>" :stepskip0 t :step day

Daily report: [2018-11-03 Sat]
| Headline     |   Time |
|--------------+--------|
| *Total time* | *4:00* |
|--------------+--------|
| Task A       |   2:00 |
| Task B       |   2:00 |
#+END:

#+BEGIN: clocktable :scope file :maxlevel 4 :tstart "<2018-11-05>" :tend "<2018-11-30>" :stepskip0 t :step day
# This now shows work done on the 5th, the correct day:
Daily report: [2018-11-05 Mon]
| Headline     |   Time |
|--------------+--------|
| *Total time* | *4:00* |
|--------------+--------|
| Task A       |   2:00 |
| Task B       |   2:00 |

#+END:

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: erroneous clocktable for November 2018 - possible DST problem
  2018-11-17  8:06 erroneous clocktable for November 2018 - possible DST problem Jeff Trull
@ 2018-11-17 20:50 ` Nicolas Goaziou
  2018-11-18  7:22   ` Jeff Trull
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2018-11-17 20:50 UTC (permalink / raw)
  To: Jeff Trull; +Cc: emacs-orgmode

Hello,

Jeff Trull <edaskel@att.net> writes:

> Clocktables containing work in November of 2018 are reported incorrectly,
> showing the wrong day (typically one earlier than the correct date). For
> example, in the attached repro.org, work is performed on the 3rd and 5th of
> November, but when daily reports are used in the clocktable the work on 5
> November is reported as occurring on 4 November. Reporting 1-4 November and
> 5-30 November separately works around the problem.
>
> In the US, Daylight Savings ended on 4 November; this fact plus a previous
> problem (reported here:
> https://stackoverflow.com/questions/42821604/why-is-emacs-org-mode-missing-one-date-from-clocktable)
> suggests DST is involved.

I think something like this was fixed in development branch. Please test
it if you can.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: erroneous clocktable for November 2018 - possible DST problem
  2018-11-17 20:50 ` Nicolas Goaziou
@ 2018-11-18  7:22   ` Jeff Trull
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Trull @ 2018-11-18  7:22 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]

OK, I can confirm that the 20181112 release has this problem but the
development version from github does not.

Thanks,
Jeff


On Sat, Nov 17, 2018 at 12:50 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Jeff Trull <edaskel@att.net> writes:
>
> > Clocktables containing work in November of 2018 are reported incorrectly,
> > showing the wrong day (typically one earlier than the correct date). For
> > example, in the attached repro.org, work is performed on the 3rd and
> 5th of
> > November, but when daily reports are used in the clocktable the work on 5
> > November is reported as occurring on 4 November. Reporting 1-4 November
> and
> > 5-30 November separately works around the problem.
> >
> > In the US, Daylight Savings ended on 4 November; this fact plus a
> previous
> > problem (reported here:
> >
> https://stackoverflow.com/questions/42821604/why-is-emacs-org-mode-missing-one-date-from-clocktable
> )
> > suggests DST is involved.
>
> I think something like this was fixed in development branch. Please test
> it if you can.
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 1757 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-18  7:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-17  8:06 erroneous clocktable for November 2018 - possible DST problem Jeff Trull
2018-11-17 20:50 ` Nicolas Goaziou
2018-11-18  7:22   ` Jeff Trull

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).