datopian / datahub-qa

:package: Bugs, issues and suggestions for datahub.io
https://datahub.io/
32 stars 6 forks source link

Validate command prints noisy warnings for date and time related data types #103

Closed anuveyatsu closed 8 months ago

anuveyatsu commented 6 years ago

If I run validate command on dataset with date, datetime or time data types, I would get following noisy warnings:

Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments: 
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 01.01.2017, _f: undefined, _strict: undefined, _locale: [object Object]
Error
    at Function.createFromInputFallback (/Users/anuarustayev/Desktop/atomatic/datahub-cli/node_modules/moment/moment.js:320:94)
    at configFromString (/Users/anuarustayev/Desktop/atomatic/datahub-cli/node_modules/moment/moment.js:2178:11)
    at configFromInput (/Users/anuarustayev/Desktop/atomatic/datahub-cli/node_modules/moment/moment.js:2547:9)
    at prepareConfig (/Users/anuarustayev/Desktop/atomatic/datahub-cli/node_modules/moment/moment.js:2530:9)
    at createFromConfig (/Users/anuarustayev/Desktop/atomatic/datahub-cli/node_modules/moment/moment.js:2497:40)
    at createLocalOrUTC (/Users/anuarustayev/Desktop/atomatic/datahub-cli/node_modules/moment/moment.js:2584:12)
    at createLocal (/Users/anuarustayev/Desktop/atomatic/datahub-cli/node_modules/moment/moment.js:2588:12)
    at hooks (/Users/anuarustayev/Desktop/atomatic/datahub-cli/node_modules/moment/moment.js:16:25)
    at castDate (/Users/anuarustayev/Desktop/atomatic/datahub-cli/node_modules/tableschema/lib/types/date.js:24:17)
    at Field.wrapper [as _castFunction] (/Users/anuarustayev/Desktop/atomatic/datahub-cli/node_modules/lodash/_createHybrid.js:87:15)

How to reproduce

Expected behaviour

anuveyatsu commented 6 years ago

This issue will be addressed here https://github.com/frictionlessdata/tableschema-js/issues/132

This is very minor item IMO so I leave it for now.