FreeBSD Bugzilla – Attachment 197476 Details for
Bug 231705
pom(6) incorrect output
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for pom(6)
pom.patch (text/plain), 1.11 KB, created by
Andrew "RhodiumToad" Gierth
on 2018-09-25 06:24:40 UTC
(
hide
)
Description:
patch for pom(6)
Filename:
MIME Type:
Creator:
Andrew "RhodiumToad" Gierth
Created:
2018-09-25 06:24:40 UTC
Size:
1.11 KB
patch
obsolete
>Index: pom.c >=================================================================== >--- pom.c (revision 315162) >+++ pom.c (working copy) >@@ -123,11 +123,13 @@ > tmd.tm_hour = 0; > tmd.tm_min = 0; > tmd.tm_sec = 0; >+ tmd.tm_isdst = -1; > } > if (otime != NULL) { > tmd.tm_hour = strtol(otime, NULL, 10); > tmd.tm_min = strtol(otime + 3, NULL, 10); > tmd.tm_sec = strtol(otime + 6, NULL, 10); >+ tmd.tm_isdst = -1; > } > tt = mktime(&tmd); > } >@@ -137,19 +139,19 @@ > (GMT.tm_min / 60.0) + (GMT.tm_sec / 3600.0)) / 24.0); > for (cnt = EPOCH; cnt < GMT.tm_year; ++cnt) > days += isleap(1900 + cnt) ? 366 : 365; >- today = potm(days) + .5; >+ today = potm(days); > if (pflag) { > (void)printf("%1.0f\n", today); > return (0); > } > (void)printf("The Moon is "); >- if ((int)today == 100) >+ if (today >= 99.5) > (void)printf("Full\n"); >- else if (!(int)today) >+ else if (today < 0.5) > (void)printf("New\n"); > else { > tomorrow = potm(days + 1); >- if ((int)today == 50) >+ if (today >= 49.5 && today < 50.5) > (void)printf("%s\n", tomorrow > today ? > "at the First Quarter" : "at the Last Quarter"); > else {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 231705
: 197476