X
Tap here to go to the mobile version of the site.

Support Forum

Why would a Date field default to 01/01/1970

Posted

In an App called Act-On I want to edit a date but it defaults to January 01, 1970. A lot of clicks to get to today's date. Any thoughts on why the default or start date would be 1970? Act-On say all fine their end. I get the same result in Firefox, Chrome or IE. Anyone seen something similar? I've cleared Cache etc. Cheers John

In an App called Act-On I want to edit a date but it defaults to January 01, 1970. A lot of clicks to get to today's date. Any thoughts on why the default or start date would be 1970? Act-On say all fine their end. I get the same result in Firefox, Chrome or IE. Anyone seen something similar? I've cleared Cache etc. Cheers John
Attached screenshots

Chosen solution

It's hard to tell from the image whether it is a field or a text label modified by the script that powers the calendar control. If it were a normal input field, I think most likely it would be blank.

JavaScript dates start from 01/01/1970. When I type this into Firefox's Web Console and press Enter:

new Date(null);

I get back this, which is midnight on Jan. 1, 1970:

Date 1970-01-01T00:00:00.000Z

So the script might be accidentally setting that (not very helpful) starting value due to something else being missing -- using a null value instead of the expected value.

Can you give a link to the page?

Read this answer in context 1

Additional System Details

Installed Plug-ins

  • ActiveTouch General Plugin Container Version 105
  • Adobe PDF Plug-In For Firefox and Netscape 15.20.20039
  • Citrix Online App Detector Plugin
  • Google Update
  • Next Generation Java Plug-in 11.101.2 for Mozilla browsers
  • The plugin allows you to have a better experience with Microsoft Lync
  • The plugin allows you to have a better experience with Microsoft SharePoint
  • Shockwave Flash 23.0 r0

Application

  • Firefox 49.0.2
  • User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
  • Support URL: https://support.mozilla.org/1/firefox/49.0.2/WINNT/en-GB/

Extensions

  • Click&Clean 4.1.1-signed.1-signed (clickclean@hotcleaner.com)
  • Download YouTube Videos as MP4 1.8.8 ({b9bfaf1c-a63f-47cd-8b9a-29526ced9060})
  • DownThemAll! 3.0.8 ({DDC359D1-844A-42a7-9AA1-88A850A938A8})
  • FireShot 0.98.89 ({0b457cAA-602d-484a-8fe7-c1d894a011ba})
  • Gmail™ Notifier (restartless) 0.6.9 (jid0-GjwrPchS3Ugt7xydvqVK4DQk8Ls@jetpack)
  • IE View 1.5.6.1-signed.1-signed ({6e84150a-d526-41f1-a480-a67d3fed910d})
  • iMacros for Firefox 9.0.3 ({81BF1D23-5F17-408D-AC6B-BD6DF7CAF670})
  • Manage Folders 1.0.7.1-signed.1-signed (firefox-managefolders@googlecode.com)
  • Memory Restart 1.18.1-signed.1-signed (memoryrestart@teamextension.com)
  • Multi-process staged rollout 1.3 (e10srollout@mozilla.org)
  • Pocket 1.0.4 (firefox@getpocket.com)
  • TableTools2 1.17.1-signed.1-signed (tabletools2@mingyi.org)
  • Undo Close Tab Replacement 10 (undotab@darktrojan.net)
  • Video DownloadHelper 6.1.1 ({b9db16a4-6edc-47ec-a1f4-b86292ed211d})
  • Web Compat 1.0 (webcompat@mozilla.org)
  • Webroot Password Manager 3.2.40 ({8ac62a8b-8b3f-43ba-9b1a-90c299b9dfda})
  • YouTube mp3 1.0.9.1-signed.1-signed (info@youtube-mp3.org)
  • Telephony Toolbar 17.0 ({318DDCC6-4A8F-4ad7-AFA8-F40F0D044C90}) (Inactive)

Javascript

  • incrementalGCEnabled: True

Graphics

  • adapterDescription: Intel(R) HD Graphics 4000
  • adapterDescription2:
  • adapterDeviceID: 0x0162
  • adapterDeviceID2:
  • adapterDrivers: igdumdim64 igd10iumd64 igd10iumd64 igdumdim32 igd10iumd32 igd10iumd32
  • adapterDrivers2:
  • adapterRAM: Unknown
  • adapterRAM2:
  • adapterSubsysID: 00000000
  • adapterSubsysID2:
  • adapterVendorID: 0x8086
  • adapterVendorID2:
  • clearTypeParameters: D [ Gamma: 2200 Pixel Structure: B ClearType Level: 50 Enhanced Contrast: 200 ] D [ Gamma: 2200 Pixel Structure: R ClearType Level: 50 Enhanced Contrast: 100 ]
  • crashGuards: []
  • direct2DEnabled: True
  • directWriteEnabled: True
  • directWriteVersion: 10.0.10586.589
  • driverDate: 12-21-2015
  • driverDate2:
  • driverVersion: 10.18.10.4358
  • driverVersion2:
  • featureLog: {u'fallbacks': [], u'features': [{u'status': u'available', u'description': u'Compositing', u'log': [{u'status': u'available', u'type': u'default'}], u'name': u'HW_COMPOSITING'}, {u'status': u'available', u'description': u'Direct3D11 Compositing', u'log': [{u'status': u'available', u'type': u'default'}], u'name': u'D3D11_COMPOSITING'}, {u'status': u'disabled', u'description': u'Direct3D9 Compositing', u'log': [{u'status': u'disabled', u'message': u'Disabled by default', u'type': u'default'}], u'name': u'D3D9_COMPOSITING'}, {u'status': u'available', u'description': u'Direct2D', u'log': [{u'status': u'available', u'type': u'default'}], u'name': u'DIRECT2D'}, {u'status': u'available', u'description': u'Direct3D11 hardware ANGLE', u'log': [{u'status': u'available', u'type': u'default'}], u'name': u'D3D11_HW_ANGLE'}]}
  • info: {u'AzureCanvasAccelerated': 0, u'AzureCanvasBackend': u'direct2d 1.1', u'AzureFallbackCanvasBackend': u'cairo', u'AzureContentBackend': u'direct2d 1.1'}
  • isGPU2Active: False
  • numAcceleratedWindows: 1
  • numTotalWindows: 1
  • supportsHardwareH264: Yes; D3D11 blacklisted with DLL igd10iumd32.dll (10.18.10.4358); Using D3D9 API
  • webglRenderer: Google Inc. -- ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)
  • windowLayerManagerRemote: True
  • windowLayerManagerType: Direct3D 11

Modified Preferences

Misc

  • User JS: No
  • Accessibility: No
FredMcD
  • Top 10 Contributor
4256 solutions 59602 answers

Helpful Reply

Sounds like a website or app issue. Check with their support.

Sounds like a website or app issue. Check with their support.
jscher2000
  • Top 10 Contributor
8763 solutions 71700 answers

Chosen Solution

It's hard to tell from the image whether it is a field or a text label modified by the script that powers the calendar control. If it were a normal input field, I think most likely it would be blank.

JavaScript dates start from 01/01/1970. When I type this into Firefox's Web Console and press Enter:

new Date(null);

I get back this, which is midnight on Jan. 1, 1970:

Date 1970-01-01T00:00:00.000Z

So the script might be accidentally setting that (not very helpful) starting value due to something else being missing -- using a null value instead of the expected value.

Can you give a link to the page?

It's hard to tell from the image whether it is a field or a text label modified by the script that powers the calendar control. If it were a normal input field, I think most likely it would be blank. JavaScript dates start from 01/01/1970. When I type this into Firefox's Web Console and press Enter: new Date(null); I get back this, which is midnight on Jan. 1, 1970: Date 1970-01-01T00:00:00.000Z So the script might be accidentally setting that (not very helpful) starting value due to something else being missing -- using a null value instead of the expected value. Can you give a link to the page?

Question owner

Thanks folks .. I think both of you are correct. The Javascript default seems to work for me. Funnily enough I just added a new "Wait" Step to the flow and when I went to choose the exact date, the default was today and not 01/01/1970. The existing Steps still default to 1970 so I've deleted them all and started afresh. Thanks for the answers. Well done.

Thanks folks .. I think both of you are correct. The Javascript default seems to work for me. Funnily enough I just added a new "Wait" Step to the flow and when I went to choose the exact date, the default was today and not 01/01/1970. The existing Steps still default to 1970 so I've deleted them all and started afresh. Thanks for the answers. Well done.
the-edmeister
  • Top 25 Contributor
  • Moderator
5406 solutions 40233 answers

To add to what Jefferson said, the "beginning" of time (null) or "Epoch" for most computer languages is Thursday, 1 January 1970 at Midnight UTC (Coordinated Universal Time)

https://en.wikipedia.org/wiki/Epoch_%28reference_date%29#Computing https://en.wikipedia.org/wiki/Unix_time

To add to what Jefferson said, the "beginning" of time (null) or "Epoch" for most computer languages is Thursday, 1 January 1970 at Midnight UTC (Coordinated Universal Time) https://en.wikipedia.org/wiki/Epoch_%28reference_date%29#Computing https://en.wikipedia.org/wiki/Unix_time