Bug 682335 - json date objects...what are they?
Summary: json date objects...what are they?
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: documentation
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 22
Assignee: Jay Dobies
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close 684061
TreeView+ depends on / blocked
 
Reported: 2011-03-04 21:22 UTC by Shannon Hughes
Modified: 2011-08-16 12:22 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:10:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Shannon Hughes 2011-03-04 21:22:40 UTC
Description of problem:
there are a few areas in pulp return JSON that has date objects. was trying to figure out if this was epoch seconds but clearly is not:

return date from sync status:

call: /pulp/api/repositories/fedora-12333277/sync/69856efd-4669-11e0-b8a1-00219b3b5088/",

return json:

  "start_time": {
    "$date": 1299229937723
  }

irb session:

Time.at(1299229937723)
 => 43140-12-16 07:55:23 -0500 

would suggest updating pulp docs to explain what date structure this is or send over scalar value as timestamp or epoch seconds. 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 John Matthews 2011-03-15 15:50:30 UTC
Need to re-test, this might be working now.

Comment 2 Mike McCune 2011-03-15 17:09:38 UTC
We noted the date formats have changed in the sync status, now we get a much nicer:

{
...
  "finish_time": "1300208938",
  "start_time": "1300208857",
...

I think we can move this to ON_QA

Comment 3 Preethi Thomas 2011-03-22 20:46:45 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.154-1.fc14.noarch
[root@preethi ~]# 


[root@preethi ~]#  curl -k -u admin:admin https://localhost/pulp/api/repositories/f14/sync/ |json_reformat
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   813    0   813    0     0   2156      0 --:--:-- --:--:-- --:--:--  2191
[
  {
    "scheduled_time": 0,
    "exception": null,
    "status_path": "/pulp/api/repositories/f14/sync/8a01cc87-54c5-11e0-9621-002564a85a58/",
    "finish_time": "1300826950",
    "start_time": "1300826822",
    "traceback": null,

Comment 4 Preethi Thomas 2011-08-16 12:10:06 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:22:14 UTC
Closing with Community Release 15

pulp-0.0.223-4.


Note You need to log in before you can comment on or make changes to this bug.