public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone.
@ 2018-05-17 12:42 Marvin Häuser
  2018-05-17 14:14 ` Carsey, Jaben
  0 siblings, 1 reply; 5+ messages in thread
From: Marvin Häuser @ 2018-05-17 12:42 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: jaben.carsey@intel.com, ruiyu.ni@intel.com

EFI_RUNTIME_SERVICES.GetTime() might return an unspecified Timezone,
such as when SetTime() has not been called after the PC-AT CMOS RTC
was cut off power. Consider this case by not attempting Timezone
translations for when it is invalid.

V2:
  - Do not change the copyright date as requested.
  - Added R-bs from V1 as no functional changes have been made.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
---
 ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
index 7d2e15f5206b..e502685a1dbb 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
@@ -506,7 +506,7 @@ PrintLsOutput(
       // Change the file time to local time.
       //
       Status = gRT->GetTime(&LocalTime, NULL);
-      if (!EFI_ERROR (Status)) {
+      if (!EFI_ERROR (Status) && (LocalTime.TimeZone != EFI_UNSPECIFIED_TIMEZONE)) {
         if ((Node->Info->CreateTime.TimeZone != EFI_UNSPECIFIED_TIMEZONE) &&
             (Node->Info->CreateTime.Month >= 1 && Node->Info->CreateTime.Month <= 12)) {
           //
-- 
2.17.0.windows.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone.
  2018-05-17 12:42 [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone Marvin Häuser
@ 2018-05-17 14:14 ` Carsey, Jaben
  2018-06-13 20:29   ` Marvin Häuser
  0 siblings, 1 reply; 5+ messages in thread
From: Carsey, Jaben @ 2018-05-17 14:14 UTC (permalink / raw)
  To: Marvin Häuser, edk2-devel@lists.01.org; +Cc: Ni, Ruiyu

Still looks good to me.  Ray?

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Marvin Häuser
> Sent: Thursday, May 17, 2018 5:43 AM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben <jaben.carsey@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
> Subject: [edk2] [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support
> unspecified local Timezone.
> Importance: High
> 
> EFI_RUNTIME_SERVICES.GetTime() might return an unspecified Timezone,
> such as when SetTime() has not been called after the PC-AT CMOS RTC
> was cut off power. Consider this case by not attempting Timezone
> translations for when it is invalid.
> 
> V2:
>   - Do not change the copyright date as requested.
>   - Added R-bs from V1 as no functional changes have been made.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
> ---
>  ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> index 7d2e15f5206b..e502685a1dbb 100644
> --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> @@ -506,7 +506,7 @@ PrintLsOutput(
>        // Change the file time to local time.
>        //
>        Status = gRT->GetTime(&LocalTime, NULL);
> -      if (!EFI_ERROR (Status)) {
> +      if (!EFI_ERROR (Status) && (LocalTime.TimeZone !=
> EFI_UNSPECIFIED_TIMEZONE)) {
>          if ((Node->Info->CreateTime.TimeZone !=
> EFI_UNSPECIFIED_TIMEZONE) &&
>              (Node->Info->CreateTime.Month >= 1 && Node->Info-
> >CreateTime.Month <= 12)) {
>            //
> --
> 2.17.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone.
  2018-05-17 14:14 ` Carsey, Jaben
@ 2018-06-13 20:29   ` Marvin Häuser
  2018-06-14  3:34     ` Ni, Ruiyu
  2018-07-20 20:10     ` Marvin Häuser
  0 siblings, 2 replies; 5+ messages in thread
From: Marvin Häuser @ 2018-06-13 20:29 UTC (permalink / raw)
  To: edk2-devel@lists.01.org, ruiyu.ni@intel.com; +Cc: jaben.carsey@intel.com

Good day Ruiyu,

Sorry, but you have not ack'd this V2 yet. Is there anything wrong you want me to correct?

Thanks,
Marvin.

> -----Original Message-----
> From: Carsey, Jaben <jaben.carsey@intel.com>
> Sent: Thursday, May 17, 2018 4:15 PM
> To: Marvin Häuser <Marvin.Haeuser@outlook.com>; edk2-
> devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>
> Subject: RE: [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support
> unspecified local Timezone.
> 
> Still looks good to me.  Ray?
> 
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > Marvin Häuser
> > Sent: Thursday, May 17, 2018 5:43 AM
> > To: edk2-devel@lists.01.org
> > Cc: Carsey, Jaben <jaben.carsey@intel.com>; Ni, Ruiyu
> > <ruiyu.ni@intel.com>
> > Subject: [edk2] [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib:
> > Support unspecified local Timezone.
> > Importance: High
> >
> > EFI_RUNTIME_SERVICES.GetTime() might return an unspecified Timezone,
> > such as when SetTime() has not been called after the PC-AT CMOS RTC
> > was cut off power. Consider this case by not attempting Timezone
> > translations for when it is invalid.
> >
> > V2:
> >   - Do not change the copyright date as requested.
> >   - Added R-bs from V1 as no functional changes have been made.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
> > Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
> > Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
> > ---
> >  ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > index 7d2e15f5206b..e502685a1dbb 100644
> > --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > @@ -506,7 +506,7 @@ PrintLsOutput(
> >        // Change the file time to local time.
> >        //
> >        Status = gRT->GetTime(&LocalTime, NULL);
> > -      if (!EFI_ERROR (Status)) {
> > +      if (!EFI_ERROR (Status) && (LocalTime.TimeZone !=
> > EFI_UNSPECIFIED_TIMEZONE)) {
> >          if ((Node->Info->CreateTime.TimeZone !=
> > EFI_UNSPECIFIED_TIMEZONE) &&
> >              (Node->Info->CreateTime.Month >= 1 && Node->Info-
> > >CreateTime.Month <= 12)) {
> >            //
> > --
> > 2.17.0.windows.1
> >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone.
  2018-06-13 20:29   ` Marvin Häuser
@ 2018-06-14  3:34     ` Ni, Ruiyu
  2018-07-20 20:10     ` Marvin Häuser
  1 sibling, 0 replies; 5+ messages in thread
From: Ni, Ruiyu @ 2018-06-14  3:34 UTC (permalink / raw)
  To: Marvin Häuser, edk2-devel@lists.01.org; +Cc: Carsey, Jaben

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Thanks/Ray

> -----Original Message-----
> From: Marvin Häuser <Marvin.Haeuser@outlook.com>
> Sent: Thursday, June 14, 2018 4:30 AM
> To: edk2-devel@lists.01.org; Ni, Ruiyu <ruiyu.ni@intel.com>
> Cc: Carsey, Jaben <jaben.carsey@intel.com>
> Subject: RE: [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support
> unspecified local Timezone.
> 
> Good day Ruiyu,
> 
> Sorry, but you have not ack'd this V2 yet. Is there anything wrong you want
> me to correct?
> 
> Thanks,
> Marvin.
> 
> > -----Original Message-----
> > From: Carsey, Jaben <jaben.carsey@intel.com>
> > Sent: Thursday, May 17, 2018 4:15 PM
> > To: Marvin Häuser <Marvin.Haeuser@outlook.com>; edk2-
> > devel@lists.01.org
> > Cc: Ni, Ruiyu <ruiyu.ni@intel.com>
> > Subject: RE: [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support
> > unspecified local Timezone.
> >
> > Still looks good to me.  Ray?
> >
> > > -----Original Message-----
> > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf
> > > Of Marvin Häuser
> > > Sent: Thursday, May 17, 2018 5:43 AM
> > > To: edk2-devel@lists.01.org
> > > Cc: Carsey, Jaben <jaben.carsey@intel.com>; Ni, Ruiyu
> > > <ruiyu.ni@intel.com>
> > > Subject: [edk2] [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib:
> > > Support unspecified local Timezone.
> > > Importance: High
> > >
> > > EFI_RUNTIME_SERVICES.GetTime() might return an unspecified
> Timezone,
> > > such as when SetTime() has not been called after the PC-AT CMOS RTC
> > > was cut off power. Consider this case by not attempting Timezone
> > > translations for when it is invalid.
> > >
> > > V2:
> > >   - Do not change the copyright date as requested.
> > >   - Added R-bs from V1 as no functional changes have been made.
> > >
> > > Contributed-under: TianoCore Contribution Agreement 1.1
> > > Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
> > > Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
> > > Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
> > > ---
> > >  ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > > b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > > index 7d2e15f5206b..e502685a1dbb 100644
> > > --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > > +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > > @@ -506,7 +506,7 @@ PrintLsOutput(
> > >        // Change the file time to local time.
> > >        //
> > >        Status = gRT->GetTime(&LocalTime, NULL);
> > > -      if (!EFI_ERROR (Status)) {
> > > +      if (!EFI_ERROR (Status) && (LocalTime.TimeZone !=
> > > EFI_UNSPECIFIED_TIMEZONE)) {
> > >          if ((Node->Info->CreateTime.TimeZone !=
> > > EFI_UNSPECIFIED_TIMEZONE) &&
> > >              (Node->Info->CreateTime.Month >= 1 && Node->Info-
> > > >CreateTime.Month <= 12)) {
> > >            //
> > > --
> > > 2.17.0.windows.1
> > >
> > > _______________________________________________
> > > edk2-devel mailing list
> > > edk2-devel@lists.01.org
> > > https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone.
  2018-06-13 20:29   ` Marvin Häuser
  2018-06-14  3:34     ` Ni, Ruiyu
@ 2018-07-20 20:10     ` Marvin Häuser
  1 sibling, 0 replies; 5+ messages in thread
From: Marvin Häuser @ 2018-07-20 20:10 UTC (permalink / raw)
  To: edk2-devel@lists.01.org, ruiyu.ni@intel.com; +Cc: jaben.carsey@intel.com

Hey Ruiyu,

Sorry if I'm bothering you, but this V2 was still not reviewed or pushed.

Regards,
Marvin.

> -----Original Message-----
> From: Marvin Häuser
> Sent: Wednesday, June 13, 2018 10:30 PM
> To: edk2-devel@lists.01.org; ruiyu.ni@intel.com
> Cc: jaben.carsey@intel.com
> Subject: RE: [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support
> unspecified local Timezone.
> 
> Good day Ruiyu,
> 
> Sorry, but you have not ack'd this V2 yet. Is there anything wrong you want
> me to correct?
> 
> Thanks,
> Marvin.
> 
> > -----Original Message-----
> > From: Carsey, Jaben <jaben.carsey@intel.com>
> > Sent: Thursday, May 17, 2018 4:15 PM
> > To: Marvin Häuser <Marvin.Haeuser@outlook.com>; edk2-
> > devel@lists.01.org
> > Cc: Ni, Ruiyu <ruiyu.ni@intel.com>
> > Subject: RE: [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support
> > unspecified local Timezone.
> >
> > Still looks good to me.  Ray?
> >
> > > -----Original Message-----
> > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf
> > > Of Marvin Häuser
> > > Sent: Thursday, May 17, 2018 5:43 AM
> > > To: edk2-devel@lists.01.org
> > > Cc: Carsey, Jaben <jaben.carsey@intel.com>; Ni, Ruiyu
> > > <ruiyu.ni@intel.com>
> > > Subject: [edk2] [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib:
> > > Support unspecified local Timezone.
> > > Importance: High
> > >
> > > EFI_RUNTIME_SERVICES.GetTime() might return an unspecified
> Timezone,
> > > such as when SetTime() has not been called after the PC-AT CMOS RTC
> > > was cut off power. Consider this case by not attempting Timezone
> > > translations for when it is invalid.
> > >
> > > V2:
> > >   - Do not change the copyright date as requested.
> > >   - Added R-bs from V1 as no functional changes have been made.
> > >
> > > Contributed-under: TianoCore Contribution Agreement 1.1
> > > Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
> > > Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
> > > Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
> > > ---
> > >  ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > > b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > > index 7d2e15f5206b..e502685a1dbb 100644
> > > --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > > +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
> > > @@ -506,7 +506,7 @@ PrintLsOutput(
> > >        // Change the file time to local time.
> > >        //
> > >        Status = gRT->GetTime(&LocalTime, NULL);
> > > -      if (!EFI_ERROR (Status)) {
> > > +      if (!EFI_ERROR (Status) && (LocalTime.TimeZone !=
> > > EFI_UNSPECIFIED_TIMEZONE)) {
> > >          if ((Node->Info->CreateTime.TimeZone !=
> > > EFI_UNSPECIFIED_TIMEZONE) &&
> > >              (Node->Info->CreateTime.Month >= 1 && Node->Info-
> > > >CreateTime.Month <= 12)) {
> > >            //
> > > --
> > > 2.17.0.windows.1
> > >
> > > _______________________________________________
> > > edk2-devel mailing list
> > > edk2-devel@lists.01.org
> > > https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-20 20:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-17 12:42 [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone Marvin Häuser
2018-05-17 14:14 ` Carsey, Jaben
2018-06-13 20:29   ` Marvin Häuser
2018-06-14  3:34     ` Ni, Ruiyu
2018-07-20 20:10     ` Marvin Häuser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox