English

Problem: ArcGIS Online pop-up windows and attribute tables display the date as a day earlier

Description

Date information in ArcGIS Online pop-up windows and attribute tables, which are stored in a Date field, appear a day earlier than the expected date.

Cause

ArcGIS Online stores time in the UTC format. This issue occurs when a Date field is used in ArcMap, but does not have a time component designated. When a service is published, the values in a Date field are copied to and stored on the server using the UTC format. If a time component has not been assigned to the Date field, the values are assumed to be in UTC format and copied to the server accordingly. Then when viewing the Date/Time values from the service, an automatic conversion value is added to the stored UTC date based on the Time Zone settings of the computer. This conversion can result in an incorrect time value and in some cases can result in the date showing as the previous day.

Solution or Workaround

Use one of the following options to solve the issue.

Option A
Enable time for the layer in ArcMap before publishing, and designate a Time Zone.

  1. Right-click the layer > Properties > Time.
  2. Check the Enable time on this layer check box, and set a local time zone in the Advanced Settings section.
  3. Click OK.
  4. Publish to ArcGIS Online as a feature service. The values in the Date field are automatically converted to UTC time when stored on the server. This allows the Date/Time to display as expected when the conversion to local time is applied.
    Note:
    Time animation is automatically enabled for a time-enabled feature service. The following documentation, ArcGIS Online Help: Disable time animation, describes the steps to disable time animation on the feature layer.

Option B
Convert the values stored in the Date field to UTC time and do not apply any time settings to the layer. This can be accomplished using the Convert Time Zone tool in ArcMap. This tool converts the Date/Time values based on the time zones entered in the parameters, and then adds a new field with the converted values. This new field can then be used when working with a service after it has been published to display the values in local time.

Option C
Use a text field to store the date information.

Note:
While Option C resolves date display issues, this is generally not considered a best practice. After following this option, functionality available only to date fields becomes unavailable.
  1. Create a new String field and use Field Calculator to populate the new field.
  2. When entering a date without a specific time, add 12 hours to that date. This allows the date information in the feature class to be reflected as expected in the web map. For an example, if the date information is '4/15/2015', edit the attribute to be '4/15/2015 12:00' or '4/15/2015 12:00 PM.' For more information, refer to the following documentation, ArcGIS Online Help: Date Functions.

Related Information