<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/OpenBmc/bmcweb.git/redfish-core/src/utils, branch master</title>
<subtitle>A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/'/>
<updated>2026-06-24T11:55:47+00:00</updated>
<entry>
<title>Reuse timezone helper in getDateTimeOffsetNow</title>
<updated>2026-06-24T11:55:47+00:00</updated>
<author>
<name>Joel P J</name>
<email>joelpj@ami.com</email>
</author>
<published>2026-06-24T11:55:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=940f5e2ce09cfeb44d0cd88717e9fb50c1d69435'/>
<id>urn:sha1:940f5e2ce09cfeb44d0cd88717e9fb50c1d69435</id>
<content type='text'>
Refactor getDateTimeOffsetNow() to reuse the existing
details::getTimeZone() helper instead of calling
std::chrono::current_zone() directly.

This keeps timezone lookup and error logging in one place, while the
caller only handles the null case and returns empty strings when the
timezone cannot be resolved.

Also simplify two return sites by using braced return syntax in
getDateTimeOffsetNow() and getDateTimeIso8601() for readability.

Change-Id: I8737debe6b9fad34847d9aa53de01ec31d765f93
Signed-off-by: Joel P J &lt;joelpj@ami.com&gt;
</content>
</entry>
<entry>
<title>Fix sd-bus header</title>
<updated>2026-06-03T16:35:39+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>ed@tanous.net</email>
</author>
<published>2026-06-03T15:17:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=5137a404e15984311ad4e5836880f49fb27dde18'/>
<id>urn:sha1:5137a404e15984311ad4e5836880f49fb27dde18</id>
<content type='text'>
Not clear when this header changed.  But tidy flags it.  Fix it.

Change-Id: Ie55980b081de8526966b90cefed3e8a107b63275
Signed-off-by: Ed Tanous &lt;etanous@nvidia.com&gt;
</content>
</entry>
<entry>
<title>Remove time_t</title>
<updated>2026-04-20T22:36:58+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>etanous@nvidia.com</email>
</author>
<published>2026-04-20T17:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=bb9aae17eeb22ae44f573fd4d33303f65760b5ad'/>
<id>urn:sha1:bb9aae17eeb22ae44f573fd4d33303f65760b5ad</id>
<content type='text'>
time_t is less specific than using the equivalents in std::chono.  In
practice, most of the time we end up converting the time_t to some
std::chrono class anyway.  Avoid the intermediate conversion and just
use the std::chrono version of time.

Tested: Unit tests pass.  Good Coverage

Change-Id: I2e3eca78760e158feaaf4b91793631343e417f15
Signed-off-by: Ed Tanous &lt;etanous@nvidia.com&gt;
</content>
</entry>
<entry>
<title>Remove now unused function</title>
<updated>2026-04-13T16:15:36+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>etanous@nvidia.com</email>
</author>
<published>2026-04-04T00:58:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=0953dfe28e32bef95eeb00c58ea0ed12a8ecaeb5'/>
<id>urn:sha1:0953dfe28e32bef95eeb00c58ea0ed12a8ecaeb5</id>
<content type='text'>
After the prior patches, this is unused.  Remove it

Tested: Code builds

Change-Id: I937984c9cb98f8f8f0f515394d9cf2960409512c
Signed-off-by: Ed Tanous &lt;etanous@nvidia.com&gt;
</content>
</entry>
<entry>
<title>Expose date/time in local timezone</title>
<updated>2026-04-10T22:21:27+00:00</updated>
<author>
<name>Igor Kanyuka</name>
<email>ifelmail@gmail.com</email>
</author>
<published>2026-03-24T12:00:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=33d7d41c71bb9a22725d77d97e41114c50b502c0'/>
<id>urn:sha1:33d7d41c71bb9a22725d77d97e41114c50b502c0</id>
<content type='text'>
BMC now exposes DateTime property under the Manager/&lt;ID&gt; in timezone
configured on the BMC (local TZ) and not in UTC, but the other date
time properties are still in UTC.
Convert date time fields to local timezone.

Tested:
1. Redfish service validator
2. Built Facebook's Catalina image with this change, ran in QEMU and
   checked manually varioius endpoints.
3. Ran automated tests [1] from openbmc-test-automation repo.
4. Unit tests

[1] https://gerrit.openbmc.org/c/openbmc/openbmc-test-automation/+/88659

Change-Id: I8e587c7a1030deff8e6a550651c5e62719fe5299
Signed-off-by: Igor Kanyuka &lt;ifelmail@gmail.com&gt;
Signed-off-by: Ed Tanous &lt;ed@tanous.net&gt;
</content>
</entry>
<entry>
<title>Remove old gcc-13 backports</title>
<updated>2026-04-10T18:00:12+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>etanous@nvidia.com</email>
</author>
<published>2026-04-03T21:32:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=83ed9f4882b70b448103bf93165c6351c3c20f94'/>
<id>urn:sha1:83ed9f4882b70b448103bf93165c6351c3c20f94</id>
<content type='text'>
This block of code implemented pre-gcc-13 support for time parsing.
gcc-13 is now required, so remove it.

Change-Id: I266042db97ebe4cdf52c4c62d693efab021ae16f
Signed-off-by: Ed Tanous &lt;etanous@nvidia.com&gt;
</content>
</entry>
<entry>
<title>Allow to set Manager TZ and show its time in local</title>
<updated>2026-03-20T20:04:48+00:00</updated>
<author>
<name>Igor Kanyuka</name>
<email>ifelmail@gmail.com</email>
</author>
<published>2026-02-23T18:27:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=22c8e70d0c41e06d15b5533f121ae704fbe8a0fb'/>
<id>urn:sha1:22c8e70d0c41e06d15b5533f121ae704fbe8a0fb</id>
<content type='text'>
Current code always return Date time in UTC, despite local timezone may
differ. This change allows to set manager timezone via redfish and show
manager's TZ and offset in manager's local timezone. When the DateTime
is being patched, the provided date time gets converted from the
provided TZ to the local timezone, but configured TZ does not get
changed. A user must explicitly patch TimeZoneName to change Manager's
TZ.

Tested:
1. Built an image, ran in QEMU, changed TZ to PST8PDT (negative offset),
UTC (0 offset), and Tokyo (positive offset). Made sure the patch works
and all the touched fields have correct values. See [1].

2. Unit tests
3. Redfish validator

[1]
```
$ curl -s -k -H 'Content-type: application/json' -u root:0penBmc https://localhost:8443/redfish/v1/Managers/bmc | jq '.DateTime, .DateTimeLocalOffset, .TimeZoneName'
"2026-03-19T11:03:16-07:00"
"-07:00"
"PST8PDT"

$ curl -i -k -H 'Content-type: application/json' -u root:0penBmc -d '{"TimeZoneName": "UTC"}' -X PATCH https://localhost:8443/redfish/v1/Managers/bmc
HTTP/1.1 204 No Content
Allow: GET, PATCH
OData-Version: 4.0
Strict-Transport-Security: max-age=31536000; includeSubdomains
Pragma: no-cache
Cache-Control: no-store, max-age=0
X-Content-Type-Options: nosniff
Date: Thu, 19 Mar 2026 18:03:28 GMT
Content-Length: 0

$ curl -s -k -H 'Content-type: application/json' -u root:0penBmc https://localhost:8443/redfish/v1/Managers/bmc | jq '.DateTime, .DateTimeLocalOffset, .TimeZoneName'
"2026-03-19T18:03:53+00:00"
"+00:00"
"UTC"

$ curl -i -k -H 'Content-type: application/json' -u root:0penBmc -d '{"TimeZoneName": "Asia/Tokyo"}' -X PATCH https://localhost:8443/redfish/v1/Managers/bmc
HTTP/1.1 204 No Content
Allow: GET, PATCH
OData-Version: 4.0
Strict-Transport-Security: max-age=31536000; includeSubdomains
Pragma: no-cache
Cache-Control: no-store, max-age=0
X-Content-Type-Options: nosniff
Date: Thu, 19 Mar 2026 18:04:20 GMT
Content-Length: 0

$ curl -s -k -H 'Content-type: application/json' -u root:0penBmc https://localhost:8443/redfish/v1/Managers/bmc | jq '.DateTime, .DateTimeLocalOffset, .TimeZoneName'
"2026-03-20T03:04:32+09:00"
"+09:00"
"Asia/Tokyo"

$ curl -i -k -H 'Content-type: application/json' -u root:0penBmc -d '{"DateTime": "2026-01-02T11:03:16-07:00"}' -X PATCH https://localhost:8443/redfish/v1/Managers/bmc
HTTP/1.1 204 No Content
Allow: GET, PATCH
OData-Version: 4.0
Strict-Transport-Security: max-age=31536000; includeSubdomains
Pragma: no-cache
Cache-Control: no-store, max-age=0
X-Content-Type-Options: nosniff
Date: Fri, 02 Jan 2026 18:03:16 GMT
Content-Length: 0

$ curl -s -k -H 'Content-type: application/json' -u root:0penBmc https://localhost:8443/redfish/v1/Managers/bmc | jq '.DateTime, .DateTimeLocalOffset, .TimeZoneName'
"2026-01-03T03:03:21+09:00"
"+09:00"
"Asia/Tokyo"

$ curl -s -k -H 'Content-type: application/json' -u root:0penBmc https://localhost:8443/redfish/v1/Managers/bmc/LogServices/Journal/Entries | jq '.Members[0]'
{
  "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal/Entries/cz0zNTMzMTVkMTBjYWQ0ZTg5ODJiYjliZGVmOTc2NDE2MDtpPTE7Yj00YzU5NzY1NzQ0M2M0N2IzOWZjYTZiNzU1ZWVlY2NjOTttPTFlZjc1Yzg7dD02MzY0OGQxOTFhZTE0O3g9ZDU5MjYwNzJkZTgzMWYzYw==",
  "@odata.type": "#LogEntry.v1_9_0.LogEntry",
  "Created": "2025-05-29T16:30:41.794580+00:00",
  "EntryType": "Oem",
  "Id": "cz0zNTMzMTVkMTBjYWQ0ZTg5ODJiYjliZGVmOTc2NDE2MDtpPTE7Yj00YzU5NzY1NzQ0M2M0N2IzOWZjYTZiNzU1ZWVlY2NjOTttPTFlZjc1Yzg7dD02MzY0OGQxOTFhZTE0O3g9ZDU5MjYwNzJkZTgzMWYzYw==",
  "Message": "kernel: Booting Linux on physical CPU 0xf00",
  "Name": "BMC Journal Entry",
  "OemRecordFormat": "BMC Journal Entry",
  "Severity": "OK"
}
```

Change-Id: I5a4567b9ca6a0f56dd9d1b971d418a19bf625a10
Signed-off-by: Igor Kanyuka &lt;ifelmail@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fix spelling mistakes using codespell</title>
<updated>2026-02-24T18:30:31+00:00</updated>
<author>
<name>George Liu</name>
<email>liuxiwei@ieisystem.com</email>
</author>
<published>2026-02-24T02:31:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=8f04d1710bb90a9dd225ce9b82cb0c157460b4a4'/>
<id>urn:sha1:8f04d1710bb90a9dd225ce9b82cb0c157460b4a4</id>
<content type='text'>
Signed-off-by: George Liu &lt;liuxiwei@ieisystem.com&gt;
Change-Id: If170e53077bc150d0062cd441394daea71f842b1
</content>
</entry>
<entry>
<title>Be more paranoid in json parsing</title>
<updated>2026-02-24T04:10:48+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>etanous@nvidia.com</email>
</author>
<published>2026-02-10T16:32:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=8216fc8a493f7fb481323058570b53553e5ae066'/>
<id>urn:sha1:8216fc8a493f7fb481323058570b53553e5ae066</id>
<content type='text'>
When taking json directly from a user, we should set some limits on
parsing depth as well as total number of value elements.  Value elements
are considered any individual value, the start of an array, the start of
a dictionary, or null.  This is to prevent flooding type attacks
creating large number of objects, while still keeping under the depth 10
cap.  This commit makes use of the nlohmann sax parse to handle this by
injecting a new error handler in between that will impose new limits.

Currently this sets the depth limit to 10 and the total number of keys
to 500;  These are intentionally high, and could be tuned or expanded on
in the future.

Tested: Unit tests pass.

Change-Id: I789543679e22b0b0ce0b2b0b71f31377b0759cd7
Signed-off-by: Ed Tanous &lt;etanous@nvidia.com&gt;
</content>
</entry>
<entry>
<title>Map Error.Unavailable to something better</title>
<updated>2025-06-26T19:07:41+00:00</updated>
<author>
<name>Gunnar Mills</name>
<email>gmills@us.ibm.com</email>
</author>
<published>2024-10-30T20:10:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=83609eb5f07b73e14be4789719b93fe933559c59'/>
<id>urn:sha1:83609eb5f07b73e14be4789719b93fe933559c59</id>
<content type='text'>
This commit is meant to kick off discussion on how we map errors from
dbus to Redfish. Currently WIP. Looking for feedback. Do we want a new
xyz.openbmc_project.Common.Error.ResourceInStandby that we can map to
Redfish's resourceInStandby? Do we think PropertyValueExternalConflict
should be mapped to something different? Are we okay with this commit,
does this work for AppliedConfig?

xyz.openbmc_project.Common.Error.Unavailable was added to Logging
Entry's Resolved Property as an error. It is used for cases when the
users attempts to set the Resolved property but is prevented until some
action is taken, "the system is not currently in a state to allow this",
the PDI review here has some more discussion[1].

The current mapping of xyz.openbmc_project.Common.Error.Unavailable to
resourceInStandby was added to SetProperty here[2] in April and comes
from this AppliedConfig error handling which was added in May 2021 by
Jonathan at Intel[3]. Mapping Error.Unavailable to resourceInStandby is
a big assumption that might apply in the AppliedConfig usecase but
wouldn't overall. PropertyValueExternalConflict is a bit broader and
might work in this AppliedConfig case? The PDI AppliedConfig[4] and
AppliedConfig in smbios[5].

Redfish doesn't have a Temporary Unavailable to mean "the system is not
currently in a state to allow this", PropertyValueExternalConflict is as
close as we get. xyz.openbmc_project.Common.Error.NotAllowed maps to
Redfish's propertyNotWritable and that is "this property can never be
wrote". We map a few things to serviceTemporarilyUnavailable, the only
Redfish error to use the word "Unavailable", but that is for temporarily
unavailable and retry in x seconds. These Redfish errors can be found
at: https://redfish.dmtf.org/registries/Base.1.19.0.json

[1]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/74019
[2]: https://github.com/openbmc/bmcweb/commit/87c449664e5375abb040af6fad63ef965c311bec
[3]: https://github.com/openbmc/bmcweb/commit/3cde86f14b7835775d7c37e993fb84a3cd01ef9d
[4]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/73c931fb942daa714bfff17e950b9d5622a25842/yaml/xyz/openbmc_project/Control/Processor/CurrentOperatingConfig.interface.yaml#L13
[5]: https://github.com/openbmc/smbios-mdr/blob/1d73dccc89f0bb9d1dce3543e5af6b3e3087d5f4/src/speed_select.cpp#L160

Tested: None.

Change-Id: I4a48937b1801189acddd02c89aa01ca0cd15362b
Signed-off-by: Gunnar Mills &lt;gmills@us.ibm.com&gt;
</content>
</entry>
</feed>
