[Feature Request] String TimeZone validation
Feature description: Since google.protobuf.TimeStamp is just seconds and nanos in UTC, a somewhat common solution to a lack of timezone information is to simply send a timezone along with it. Sending a numerical offset is sometimes fragile as offsets can change due to daylight savings or tz updates, so a tz string may be sent along with a timestamp instead.
It would be nice to have a means to validate that the timezone is valid, as per the cel timezone supported formats (eg. TimeZone = "UTC" | LongTZ , as I don't think FixedTZ makes as much sense in this context)
Problem it solves or use case: Consider the following proto:
syntax = "proto3";
package some.thing.v1;
import "buf/validate/validate.proto";
import "google/protobuf/timestamp.proto";
message TimestampTZ {
google.protobuf.Timestamp ts = 1;
string tz = 2;
}
It would be nice to have something like:
string tz = 2 [(buf.validate.field).string.timezone = true];
Even if timezone is validated by protovalidate, to utilize the value itself the callers will need to re-parse it.
Of course, yes. The same could also be said of UUID validation (and other examples too).