Bug 1347746

Summary: different ls -l /dev/disk/by-uuid between previous Fedora, fedora beta and Fedora24
Product: [Fedora] Fedora Reporter: Leslie Satenstein <lsatenstein>
Component: coreutilsAssignee: Kamil Dudka <kdudka>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 24CC: admiller, jamartis, kdudka, kzak, lsatenstein, ooprala, ovasik, p, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-17 20:09:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ls -l /dev/disk/by-uuid (f24 beta)
none
ls -l /dev/disk/by-uuid (f24 gold)
none
ls -l /dev/disk/by-uuid (f23) none

Description Leslie Satenstein 2016-06-17 14:09:16 UTC
Created attachment 1169137 [details]
ls -l /dev/disk/by-uuid       (f24 beta)

Description of problem:

The time has been replaced by 2016 (the year)
with older betas, the time was listed has hh:mm  

Refer to two listings attached.

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

Three listings   
F24 beta (from koji)

f24 gold  (from koji)

F23       (from f23 gold)
How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Leslie Satenstein 2016-06-17 14:10:24 UTC
Created attachment 1169138 [details]
ls -l /dev/disk/by-uuid       (f24 gold)

Check out the column for time

Comment 2 Leslie Satenstein 2016-06-17 14:11:30 UTC
Created attachment 1169139 [details]
ls -l /dev/disk/by-uuid       (f23)

F23 and F24 beta listings and centos are identical in format

Comment 3 Leslie Satenstein 2016-06-17 15:09:47 UTC
Please note. On the day Fedora is installed the hhmm field (see attachments) is shown as 2016  

The day after the install date year field is replaced by HH:MM

I was parsing the above listings and searching for HH:MM 


I have since changed my parser program.  This bug is for me a very low priority.

Comment 4 Kamil Dudka 2016-06-17 15:43:51 UTC
Please attach the output of 'date' on the system in question.  I suspect this is shown because date/time is not set properly.  The info documentation for ls says:

    By default, file timestamps are listed in abbreviated form, using a date
    like ‘Mar 30  2002’ for non-recent timestamps, and a date-without-year
    and time like ‘Mar 30 23:45’ for recent timestamps.  This format can
    change depending on the current locale as detailed below.

Comment 5 Kamil Dudka 2016-06-17 15:45:49 UTC
(In reply to Leslie Satenstein from comment #3)
> I was parsing the above listings and searching for HH:MM

Please consider using the --time-style option of ls if you intend to parse the output.

Comment 6 Leslie Satenstein 2016-06-17 17:25:40 UTC
Today 9am I installed F24 (using june14 version).  Yes, the date was correct, (today), and the hh:mm was replaced by yyyy.

My software was looking for hh:mm.   As you note, attachment 2 [details] is what is produced.

As I stated in comment 3,  I revised my software so that any date format is acceptable to my stuff.

As you say, the ls -l /dev/disk/by-uuid can have multiple formats, my parser has been revised to accept any date format.

I was expecting the  "ls -l /dev/disk/by-uuid" format to be invariant.

You have pointed out that it is not a bug! Even if the creation timestamp was an hour earlier.

You may close this issue as not-a-bug

Thank you for the prompt followup.

Comment 7 Kamil Dudka 2016-06-17 20:09:58 UTC
Thanks for clarifying it!  Closing...

Comment 8 Kamil Dudka 2016-08-26 06:46:05 UTC
*** Bug 1370362 has been marked as a duplicate of this bug. ***

Comment 9 Leslie Satenstein 2016-08-26 13:18:15 UTC
Please keep as closed   
I was using region as Canada English (which also formats the date differently)

The following code fragment may help anyone wanting to extract the UUID if the line is with the date formats listed as attachments.
I put it here in case someone encounters a different date format ... 

#include <string.h>
....
 char *extract_field(char *fstabline)
{
    char *cp=strstr(fstabline," ->"); /* at end of desired field*/
    if(cp) {
      *cp-- = '\0';
      while(*cp!=' ' && *cp)         /*backup to opening char */   
           cp--;
      cp++;
    }
    return cp;
}