[#BloombergLP-balber-BerUtil_TimezoneOffsetImpUtil-getTimezoneOffsetInMinutesIfValid]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerUtil_TimezoneOffsetImpUtil.adoc[BerUtil&lowbar;TimezoneOffsetImpUtil]::getTimezoneOffsetInMinutesIfValid
:relfileprefix: ../../../
:mrdocs:

Decode a time&hyphen;zone offset if it is within the valid range&period;

== Synopsis

Declared in `&lt;balber&lowbar;berutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
getTimezoneOffsetInMinutesIfValid(
    int* value,
    std::streambuf* streamBuf);
----

== Description

If the offset is greater than or equal to `k&lowbar;MIN&lowbar;OFFSET` and less than or equal to `k&lowbar;MAX&lowbar;OFFSET` then load the value of the offset to the specified `value` and return zero, otherwise do not modify the value addressed by `value` and return non&hyphen;zero&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| destination for the decoded value
| *streamBuf*
| input stream buffer
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
