Bug 1244512 - Api call user.getLoggedInTime returns un-timestamped value.
Summary: Api call user.getLoggedInTime returns un-timestamped value.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Spacewalk
Classification: Community
Component: API
Version: 2.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Dobes
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space27
TreeView+ depends on / blocked
 
Reported: 2015-07-19 14:05 UTC by Matej Kollar
Modified: 2017-09-28 18:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-11 13:07:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Matej Kollar 2015-07-19 14:05:51 UTC
Description of problem:

Timestamp value returned by user.getLoggedInTime is not timestamped and thus is useless.

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


How reproducible: allways/deterministic


Steps to Reproduce:
1. Run the following script parametrized by hostname of your Spacewalk:

    #!/usr/bin/env python
    import xmlrpclib
    import sys 
    
    USER = "admin"
    PASS = "nimda"
    SERVER = "http://%s/rpc/api" % sys.argv[1]
    
    client = xmlrpclib.Server(SERVER, verbose=0)
    client2 = xmlrpclib.Server(SERVER, verbose=1)
    
    key = client.auth.login(USER, PASS)
    client2.user.getLoggedInTime(key, "admin")
    client.auth.logout(key)

Actual results:

Response body contains something like

    <dateTime.iso8601>20150719T09:54:46</dateTime.iso8601>

(Which in case you are not in the same timezone as a server, is not exactly useful.)

Expected results: Timezoned value

Additional info:

* ISO 8601 allows use of timezone
* possible workaround is using user.getDetails which return struct with field
  last_login_date. That is string formatted in the following way:
     user never logged in: ""
     otherwise: example "7/3/15 4:41:06 AM EDT" (that is not a ISO 8601
     but might be parsable just ok)
* Why not deprecate user.getLoggedInTime?

Comment 4 Jiří Dostál 2016-03-11 13:07:02 UTC
user.getLoggedInTime has been already deprecated. Closing this one.

Comment 5 Eric Herget 2017-09-28 18:09:54 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.


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