Align NowFunc::new() with canonical ConfigOptions timezone and enhance documentation
          #18347
        
          
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Which issue does this PR close?
Rationale for this change
The deprecated
NowFunc::new()constructor previously initialized its timezone using the shorthand offset"+00", which was inconsistent with the canonical UTC offset format"+00:00"used byConfigOptions::default(). This mismatch could cause subtle inconsistencies inScalarValuecomparisons or downstream timezone handling.This PR ensures backward compatibility while aligning
NowFunc::new()with the canonical default configuration, making behavior consistent across both constructors. It also improves documentation to clarify this relationship and provides a regression test to confirm parity between the two initialization paths.What changes are included in this PR?
NowFunc::new()to delegate toNowFunc::new_with_config(&ConfigOptions::default()).NowFunc::new()andNowFunc::new_with_config()produce identical return fields and scalar values.scalar_functions.md) to note the constructor preference and clarify the canonical default timezone format (+00:00).Are these changes tested?
✅ Yes. A new test
now_func_default_matches_configwas added to confirm functional equivalence between the legacy and configuration-based constructors, including matching field outputs and scalar timezones.Are there any user-facing changes?
Yes, but backward-compatible:
NowFunc::new()remains available but now mirrors the canonical timezone offset (+00:00).NowFunc::new_with_config()method.No breaking API or behavior changes are expected, as this update standardizes the default timezone while maintaining prior function signatures.