# Bug OP-1711 - [TimeEntries] spent_on date always displays the current date

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-1711

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 4.0.2 |
| Observed in versions |  |
| Sprint | 4.0.2 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

In both the current stable branch (4.0.1) and the dev branch (tested @ 0220c67), the detail view of logged time entries does not show the logged date (`spent_on`), but instead displays the current time.

I believe this is an error in the data passing in the angular scope. The parameter `dateValue` is empty, and thus undefined is passed to

`scope.date = TimezoneService.formattedDate(scope.dateValue);`

which in turn results in the date always set to today.  
The issue appears to be fixed when adding a data observer to the custom directive.

The following example contains a time entry with `spent_on` set to 2014-11-02:

![](https://dl.dropboxusercontent.com/u/270758/op_spent_on_fe.png)

yet, the detail view shows the current date.

![](https://dl.dropboxusercontent.com/u/270758/op_spent_on_f.png)
