Codota Logo
ConnectionFactoryImpl.createPostgresTimeZone
Code IndexAdd Codota to your IDE (free)

How to use
createPostgresTimeZone
method
in
org.postgresql.core.v3.ConnectionFactoryImpl

Best Java code snippets using org.postgresql.core.v3.ConnectionFactoryImpl.createPostgresTimeZone (Showing top 1 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: org.postgresql/postgresql

private List<String[]> getParametersForStartup(String user, String database, Properties info) {
 List<String[]> paramList = new ArrayList<String[]>();
 paramList.add(new String[]{"user", user});
 paramList.add(new String[]{"database", database});
 paramList.add(new String[]{"client_encoding", "UTF8"});
 paramList.add(new String[]{"DateStyle", "ISO"});
 paramList.add(new String[]{"TimeZone", createPostgresTimeZone()});
 Version assumeVersion = ServerVersion.from(PGProperty.ASSUME_MIN_SERVER_VERSION.get(info));
 if (assumeVersion.getVersionNum() >= ServerVersion.v9_0.getVersionNum()) {
  // User is explicitly telling us this is a 9.0+ server so set properties here:
  paramList.add(new String[]{"extra_float_digits", "3"});
  String appName = PGProperty.APPLICATION_NAME.get(info);
  if (appName != null) {
   paramList.add(new String[]{"application_name", appName});
  }
 } else {
  // User has not explicitly told us that this is a 9.0+ server so stick to old default:
  paramList.add(new String[]{"extra_float_digits", "2"});
 }
 String replication = PGProperty.REPLICATION.get(info);
 if (replication != null && assumeVersion.getVersionNum() >= ServerVersion.v9_4.getVersionNum()) {
  paramList.add(new String[]{"replication", replication});
 }
 String currentSchema = PGProperty.CURRENT_SCHEMA.get(info);
 if (currentSchema != null) {
  paramList.add(new String[]{"search_path", currentSchema});
 }
 return paramList;
}
org.postgresql.core.v3ConnectionFactoryImplcreatePostgresTimeZone

Javadoc

Convert Java time zone to postgres time zone. All others stay the same except that GMT+nn changes to GMT-nn and vise versa.

Popular methods of ConnectionFactoryImpl

  • doAuthentication
  • enableSSL
  • sendStartupPacket
  • readStartupMessages
  • runInitialQueries
  • <init>
  • closeStream
  • createSSPI
  • getParametersForStartup
  • isMaster
  • log
  • tryConnect
  • log,
  • tryConnect

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • findViewById (Activity)
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • BoxLayout (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now