https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-05-12T16:52:38ZRedmineRedmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=91642009-05-12T16:52:38ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>If I had this validation, I'm pretty sure that some users will complain about it.<br />Any other opinions?</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=92582009-05-14T19:04:04ZOlafur Gislason
<ul></ul><p>One possibility is a checkbox in project settings page that would turn on/off that validation.</p>
<p>This could in my opinion also apply to logging time on a closed issue. ( The checkbox ).</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=93852009-05-19T18:29:36ZEric Davis
<ul></ul><p>I don't like the idea of adding another option to the project settings page. What if when a time was logged that is in the future, we display a message along the lines of "Time added successfully. This time was logged to a future date". That would at least make it visible to the user that they might have made a typo.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=93902009-05-19T18:53:57ZNanda P
<ul></ul><p>I agree with the warning message.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=235562010-12-30T04:35:28ZMischa The Evil
<ul><li><strong>Tracker</strong> changed from <i>Defect</i> to <i>Feature</i></li><li><strong>Subject</strong> changed from <i>Spent time allows Future date"</i> to <i>Spent time allows Future date</i></li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=730212016-08-27T05:04:23ZGo MAEDA
<ul><li><strong>Is duplicate of</strong> <i><a class="issue tracker-2 status-8 priority-4 priority-default" href="/issues/13244">Feature #13244</a>: Restrict log time for old days</i> added</li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=730232016-08-27T05:06:14ZGo MAEDA
<ul><li><strong>Is duplicate of</strong> deleted (<i><a class="issue tracker-2 status-8 priority-4 priority-default" href="/issues/13244">Feature #13244</a>: Restrict log time for old days</i>)</li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=730262016-08-27T05:06:39ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-8 priority-4 priority-default" href="/issues/13244">Feature #13244</a>: Restrict log time for old days</i> added</li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=730302016-08-27T05:07:42ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/14840">Defect #14840</a>: Time logging shouldn't be possible for the future periods</i> added</li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=730702016-08-29T06:05:14ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-4 priority-default" href="/issues/13596">Feature #13596</a>: Allow time logging only for open issues</i> added</li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=734162016-09-09T10:12:30ZToshi MARUYAMA
<ul></ul><p><a class="issue tracker-2 status-8 priority-4 priority-default" title="Feature: Restrict log time for old days (Reopened)" href="https://www.redmine.org/issues/13244#note-16">#13244#note-16</a> has patch.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=734242016-09-10T07:24:28ZMarius BĂLTEANU
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>If I had this validation, I'm pretty sure that some users will complain about it.<br />Any other opinions?</p>
</blockquote>
<p>I do not see an use case for adding spent times on future dates. In my opinion, a spent time added for tomorrow (for example) is just an estimation.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=787672017-05-24T16:08:51ZKirill Marchuk
<ul></ul><p>first of all, how is it that this FR duplicates <a class="issue tracker-2 status-8 priority-4 priority-default" title="Feature: Restrict log time for old days (Reopened)" href="https://www.redmine.org/issues/13244">#13244</a> ?</p>
<p>These are totally different things!</p>
<p>This issue goes about restricting time logging in FUTURE, to avoid cheating or mistakes.</p>
<p>Issue <a class="issue tracker-2 status-8 priority-4 priority-default" title="Feature: Restrict log time for old days (Reopened)" href="https://www.redmine.org/issues/13244">#13244</a> has it about restricting time logged on days, that are X and more days in the past, to ensure employees discipline and to avoid "forgetting to log time" issues</p>
<p>what can I as a Redmine user do, to have these 2 issues decoupled and let <a class="issue tracker-2 status-8 priority-4 priority-default" title="Feature: Restrict log time for old days (Reopened)" href="https://www.redmine.org/issues/13244">#13244</a> pass thru the pipeline and get merged into upstream Redmine ?</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=794212017-06-23T12:58:44ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> deleted (<i><a class="issue tracker-2 status-8 priority-4 priority-default" href="/issues/13244">Feature #13244</a>: Restrict log time for old days</i>)</li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=794222017-06-23T12:58:50ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-8 priority-4 priority-default" href="/issues/13244">Feature #13244</a>: Restrict log time for old days</i> added</li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=843282018-04-02T19:56:57ZMarius BĂLTEANU
<ul><li><strong>File</strong> <i>0001-setting-to-not-allow-spent-times-on-future-dates.patch</i> added</li></ul><p>I made a patch that adds a new setting to the Time Tracking tab. Admins can now allows / or do not allows time logs on future dates. The default setting is to allow in order to not change the current behaviour.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=843502018-04-03T06:36:00ZGo MAEDA
<ul></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p>I made a patch that adds a new setting to the Time Tracking tab. Admins can now allows / or do not allows time logs on future dates. The default setting is to allow in order to not change the current behaviour.</p>
</blockquote>
<p>Fine improvement! But I think it will be even better if the error is more specific, for example, "Future date is not allowed" instead of "Date invalid".</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=843512018-04-03T07:39:09ZMarius BĂLTEANU
<ul><li><strong>File</strong> <i>0001-setting-to-not-allow-spent-times-on-future-dates.patch</i> added</li></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Fine improvement! But I think it will be even better if the error is more specific, for example, "Future date is not allowed" instead of "Date invalid".</p>
</blockquote>
<p>Totally agree, I had this in mind after I retested my patch in this morning. Here is the updated one.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=843522018-04-03T07:39:16ZMarius BĂLTEANU
<ul><li><strong>File</strong> deleted (<del><i>0001-setting-to-not-allow-spent-times-on-future-dates.patch</i></del>)</li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=843532018-04-03T07:46:11ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=843592018-04-03T12:12:49ZMischa The Evil
<ul></ul><p><a class="user active" href="https://www.redmine.org/users/27597">Marius Ionescu</a> and @Go: please hold the presses on this issue/patch. I'll elaborate below.</p>
<p>Over the last year (!), I've been working – silenty, and in tiny iterations – on an extensive (last count: 124 local development commits, 1200+ diff-LOC) patch series for a third-party, covering four whole new timelog restrictions (among one covers this particular issue) and extensions over the two restrictions already implemented for <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Settings to accept 0 hours time entries and for maximum hours per user and day (Closed)" href="https://www.redmine.org/issues/24005">#24005</a>, in one coherent, consistent and tested implementation, where each restriction comes with its own project, user, group, role and administrator exclusion/inclusion settings.<br />This work-in-progress is currently (and finally) in its final stages and thus nearing completion. This would also come with proper, detailed documentation.</p>
<p>I think it's only a matter of weeks utmost before all the remaining 'work' (it's already feature complete) will be completed. Therefore, I'd like to ask you all sincerely to wait with any potential core integration of any patch for this issue (or issue's <a class="issue tracker-2 status-8 priority-4 priority-default" title="Feature: Restrict log time for old days (Reopened)" href="https://www.redmine.org/issues/13244">#13244</a> and <a class="issue tracker-2 status-1 priority-4 priority-default" title="Feature: Allow time logging only for open issues (New)" href="https://www.redmine.org/issues/13596">#13596</a>, for that matter) until I've been able to open-source (i.e. share) the finished patch series in a proper manner, here on redmine.org publicly.</p>
<p>Thanks in advance...</p>
<p>P.S.: <a class="user active" href="https://www.redmine.org/users/27597">Marius Ionescu</a>, this is in no way meant as a review of your patch(es)... ;)<br />P.P.S.: off-topic note to self: review and/or change future strategy regarding issue-assignment to prevent other users, repeatedly, working simultaneously on the same issues as I am, thus wasting my or their time in the end.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=843602018-04-03T14:20:16ZMarius BĂLTEANU
<ul></ul><p>Mischa The Evil wrote:</p>
<blockquote>
<p><a class="user active" href="https://www.redmine.org/users/27597">Marius Ionescu</a> and @Go: please hold the presses on this issue/patch. I'll elaborate below.</p>
<p>Over the last year (!), I've been working – silenty, and in tiny iterations – on an extensive (last count: 124 local development commits, 1200+ diff-LOC) patch series for a third-party ...</p>
</blockquote>
<p>This is why Waterfall is so bad :)</p>
<blockquote>
<p>This work-in-progress is currently (and finally) in its final stages and thus nearing completion. This would also come with proper, detailed documentation.</p>
</blockquote>
<blockquote>
<p>I think it's only a matter of weeks utmost before all the remaining 'work' (it's already feature complete) will be completed. Therefore, I'd like to ask you all sincerely to wait with any potential core integration of any patch for this issue (or issue's <a class="issue tracker-2 status-8 priority-4 priority-default" title="Feature: Restrict log time for old days (Reopened)" href="https://www.redmine.org/issues/13244">#13244</a> and <a class="issue tracker-2 status-1 priority-4 priority-default" title="Feature: Allow time logging only for open issues (New)" href="https://www.redmine.org/issues/13596">#13596</a>, for that matter) until I've been able to open-source (i.e. share) the finished patch series in a proper manner, here on redmine.org publicly.</p>
<p>Thanks in advance...</p>
<p>P.S.: <a class="user active" href="https://www.redmine.org/users/27597">Marius Ionescu</a>, this is in no way meant as a review of your patch(es)... ;)<br />P.P.S.: off-topic note to self: review and/or change future strategy regarding issue-assignment to prevent other users, repeatedly, working simultaneously on the same issues as I am, thus wasting my or their time in the end.</p>
</blockquote>
<p>I've invested only one hour in developing this patch, so is not a big waste from my point of view. I'm happy that you post your plan here because i's also in my plan for this week to develop the restriction for <a class="issue tracker-2 status-8 priority-4 priority-default" title="Feature: Restrict log time for old days (Reopened)" href="https://www.redmine.org/issues/13244">#13244</a>. My main problem here is that we really need these 2 features internally next week, so I can't wait too long. Can we continue this discussion in private? Maybe we can find together a better solution.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=843622018-04-03T15:06:32ZGo MAEDA
<ul></ul><p>I am very looking forward Mischa's work. Aside from it, I found that Marius's patch may not work depending on time zones.</p>
<p>Suppose that time-zone of the user is set to Tokyo (+0900) and the server is set to UTC. If the user tries to log time for today at 08:00 on April 1 in Tokyo (23:00 UTC on March 31), the user cannot log time and see "Cannot log time on a future date" error. This is because <code>TimeEntry#spent_on</code> is April 1 and the server's date is March 31. In this situation, <code>TimeEntry#spent_on.future?</code> returns true and the user sees the error message.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=844102018-04-07T11:05:38ZMarius BĂLTEANU
<ul><li><strong>File</strong> deleted (<del><i>0001-setting-to-not-allow-spent-times-on-future-dates.patch</i></del>)</li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=844112018-04-07T11:15:38ZMarius BĂLTEANU
<ul><li><strong>File</strong> <i>0001-setting-to-not-allow-spent-times-on-future-dates.patch</i> added</li></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>I am very looking forward Mischa's work. Aside from it, I found that Marius's patch may not work depending on time zones.</p>
<p>Suppose that time-zone of the user is set to Tokyo (+0900) and the server is set to UTC. If the user tries to log time for today at 08:00 on April 1 in Tokyo (23:00 UTC on March 31), the user cannot log time and see "Cannot log time on a future date" error. This is because <code>TimeEntry#spent_on</code> is April 1 and the server's date is March 31. In this situation, <code>TimeEntry#spent_on.future?</code> returns true and the user sees the error message.</p>
</blockquote>
<p>I've fixed the issue, thanks for feedback.</p>
<p>I'm attaching the patch here for those who need this feature until Mischa's work is public and ready. Also, I don't see any problem to have this committed for the next version and override by Mischa patches in the future.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=844302018-04-08T11:49:47ZMarius BĂLTEANU
<ul><li><strong>File</strong> deleted (<del><i>0001-setting-to-not-allow-spent-times-on-future-dates.patch</i></del>)</li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=844392018-04-08T12:14:47ZMarius BĂLTEANU
<ul><li><strong>File</strong> <i>0001-setting-to-not-allow-spent-times-on-future-dates.patch</i> added</li></ul><p>Another update with two fixes:<br />- take into account the time zone of the time entry author and not of the current user.<br />- apply the validation only when the spent on date was changed (to follow the implementation from <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Settings to accept 0 hours time entries and for maximum hours per user and day (Closed)" href="https://www.redmine.org/issues/24005">#24005</a>).</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=872522018-09-14T05:12:52ZMarius BĂLTEANU
<ul></ul><p>Go Maeda, I would suggest to propose this feature for the next Redmine version and when Mischa’s work is ready, we can apply it on top of this. A basic implementation (like mine) is better than nothing. What do you think?</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=872542018-09-14T05:25:17ZGo MAEDA
<ul></ul><p>Hi Mischa, could you tell us the current status of your work? You wrote in <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Setting to restrict spent times on future dates (Closed)" href="https://www.redmine.org/issues/3322#note-21">#3322#note-21</a> that you were about to post patches. We are very looking forward to seeing your work.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=872552018-09-14T05:32:15ZMarius BĂLTEANU
<ul></ul><p>Sorry for not asking Mischa, but I’ve observed that he was no longer active in the last months.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=887382018-12-03T23:38:47ZMarius BĂLTEANU
<ul><li><strong>Target version</strong> changed from <i>Candidate for next major release</i> to <i>4.1.0</i></li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=887542018-12-04T23:40:22ZGo MAEDA
<ul><li><strong>Assignee</strong> set to <i>Marius BĂLTEANU</i></li></ul><p>Marius, could you check the patch? The test fails with the trunk <a class="changeset" title="Wrong columns after CSV export (#26785). Patch by Mizuki ISHIKAWA." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/17686">r17686</a>.</p>
<pre>
$ bin/rails test test/unit/time_entry_test.rb:129
Run options: --seed 16073
# Running:
F
Failure:
TimeEntryTest#test_should_not_accept_future_dates_if_disabled [/Users/maeda/redmines/redmine-trunk/test/unit/time_entry_test.rb:134]:
Expected false to be truthy.
bin/rails test test/unit/time_entry_test.rb:129
Finished in 0.735537s, 1.3596 runs/s, 1.3596 assertions/s.
1 runs, 1 assertions, 1 failures, 0 errors, 0 skips
</pre> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=887862018-12-06T06:42:17ZMarius BĂLTEANU
<ul></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Marius, could you check the patch? The test fails with the trunk <a class="changeset" title="Wrong columns after CSV export (#26785). Patch by Mizuki ISHIKAWA." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/17686">r17686</a>.</p>
<p>[...]</p>
</blockquote>
<p>Strange. The tests pass on my local enviornmnet:</p>
<pre>
oot@45ec3a6558b0:/work# ruby test/unit/time_entry_test.rb
DEPRECATION WARNING: `secrets.secret_token` is deprecated in favor of `secret_key_base` and will be removed in Rails 6.0. (called from <top (required)> at /work/config/environment.rb:14)
Run options: --seed 7768
# Running:
....................
Finished in 1.356831s, 14.7402 runs/s, 37.5876 assertions/s.
20 runs, 51 assertions, 0 failures, 0 errors, 0 skips
</pre>
<p>And to double check, I've pushed the branch also on GitLab and the tests pass also there: <a class="external" href="https://gitlab.com/marius-balteanu/redmine/pipelines/39104859">https://gitlab.com/marius-balteanu/redmine/pipelines/39104859</a></p>
<p>Can you check again your environment, please?</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=887882018-12-06T07:07:19ZGo MAEDA
<ul></ul><p>Perhaps a timezone issue?</p>
<p>I ran the test around 8:30(JST/UTC+0900) on December 4th. But at that time, it was still December 3rd in UTC.</p>
<p>It is around 16:05(JST) now, the test passes.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=887902018-12-06T07:35:52ZMarius BĂLTEANU
<ul></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Perhaps a timezone issue?</p>
<p>I ran the test around 8:30(JST/UTC+0900) on December 4th. But at that time, it was still December 3rd in UTC.</p>
<p>It is around 16:05(JST) now, the test passes.</p>
</blockquote>
<p>Yes, could be, what do you think if I replace in the patch the method <code>Date.tomorrow</code> with <code>User.current.today + 1</code> ?<br /><pre><code class="diff syntaxhl"><span class="gh">diff --git a/test/unit/time_entry_test.rb b/test/unit/time_entry_test.rb
index e94c64b..2551c6f 100644
</span><span class="gd">--- a/test/unit/time_entry_test.rb
</span><span class="gi">+++ b/test/unit/time_entry_test.rb
</span><span class="p">@@ -121,7 +121,7 @@</span> class TimeEntryTest < ActiveSupport::TestCase
def test_should_accept_future_dates
entry = TimeEntry.generate
<span class="gd">- entry.spent_on = Date.tomorrow
</span><span class="gi">+ entry.spent_on = User.current.today + 1
</span>
assert entry.save
end
<span class="p">@@ -129,7 +129,7 @@</span> class TimeEntryTest < ActiveSupport::TestCase
def test_should_not_accept_future_dates_if_disabled
with_settings :timelog_accept_future_dates => '0' do
entry = TimeEntry.generate
<span class="gd">- entry.spent_on = Date.tomorrow
</span><span class="gi">+ entry.spent_on = User.current.today + 1
</span>
assert !entry.save
assert entry.errors[:base].present?
</code></pre></p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=887942018-12-06T13:05:24ZGo MAEDA
<ul></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p>Yes, could be, what do you think if I replace in the patch the method <code>Date.tomorrow</code> with <code>User.current.today + 1</code> ?</p>
</blockquote>
<p>Thank you for the fix, now it looks good. After applying the patch in <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Setting to restrict spent times on future dates (Closed)" href="https://www.redmine.org/issues/3322#note-35">#3322#note-35</a>, tests passed without any problem.</p>
<hr />
<p>December 7th at the local time, December 6th in UTC.</p>
<pre>
laphroaig:redmine-trunk maeda$ date && date -u
Fri Dec 7 01:42:18 NZDT 2018
Thu Dec 6 12:42:18 UTC 2018
</pre>
<p>The test fails.</p>
<pre>
laphroaig:redmine-trunk maeda$ ruby test/unit/time_entry_test.rb
WARNING: Nokogiri was built against LibXML version 2.9.7, but has dynamically loaded 2.9.8
Run options: --seed 7458
# Running:
.........F
Failure:
TimeEntryTest#test_should_not_accept_future_dates_if_disabled [test/unit/time_entry_test.rb:134]:
Expected false to be truthy.
bin/rails test test/unit/time_entry_test.rb:129
..........
Finished in 3.736849s, 5.3521 runs/s, 13.3803 assertions/s.
20 runs, 50 assertions, 1 failures, 0 errors, 0 skips
</pre>
<p><code>User.current.today</code> returns a date in NZDT (the user's timezone). <code>Date.tommorow</code> returns a date in UTC. <code>Date.tommorow</code> is expected to return "Fri, 08 Dec 2018", but actually it returns "Fri, 07 Dec 2018" in the test code because the current date in UTC is "Fri, 06 Dec 2018".</p>
<pre>
(byebug) User.current.today
Fri, 07 Dec 2018
(byebug) Date.tomorrow
Fri, 07 Dec 2018
(byebug) Date.current
Thu, 06 Dec 2018
(byebug) Time.zone.name
"UTC"
</pre>
<p>Test passes after applying the patch in <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Setting to restrict spent times on future dates (Closed)" href="https://www.redmine.org/issues/3322#note-35">#3322#note-35</a>.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=887992018-12-06T17:55:51ZMarius BĂLTEANU
<ul><li><strong>File</strong> deleted (<del><i>0001-setting-to-not-allow-spent-times-on-future-dates.patch</i></del>)</li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=888002018-12-06T17:57:52ZMarius BĂLTEANU
<ul><li><strong>File</strong> <a href="/attachments/21954">0001-Setting-to-restrict-spent-times-on-future-dates-3322.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/21954/0001-Setting-to-restrict-spent-times-on-future-dates-3322.patch">0001-Setting-to-restrict-spent-times-on-future-dates-3322.patch</a> added</li></ul><p>Thank you for making all of those tests. I've updated the patch.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=889042018-12-11T03:57:20ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Committed the patch. Thank you for improving Redmine.</p> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=889052018-12-11T03:58:01ZGo MAEDA
<ul><li><strong>Assignee</strong> changed from <i>Marius BĂLTEANU</i> to <i>Go MAEDA</i></li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=889072018-12-11T04:22:16ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul> Redmine - Feature #3322: Setting to restrict spent times on future dateshttps://www.redmine.org/issues/3322?journal_id=889082018-12-11T05:56:00ZMarius BĂLTEANU
<ul><li><strong>Subject</strong> changed from <i>Spent time allows Future date</i> to <i>Setting to restrict spent times on future dates</i></li></ul>