Bug 682335

Summary: json date objects...what are they?
Product: [Retired] Pulp Reporter: Shannon Hughes <shughes>
Component: documentationAssignee: Jay Dobies <jason.dobies>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jmatthew, mmccune, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 22   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:10:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 647488, 684061    

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.